perm filename SUPDUP.XGP[NET,MRC] blob sn#314820 filedate 1977-11-06 generic text, type T, neo UTF8
/FONT#0=FIX20.FNT[XGP,SYS]
/BMAR=1
/TMAR=128
/RMAR=1699
/LMAR=128
/PMAR=2065
/XLINE=4
SAIL MRC        06:02:42 Sunday, November 6, 1977   LQ+2D.19H.13M.15S.
SUPDUP.MID[NET,MRC] Created 10:08 Saturday, November 5, 1977   LQ+1D.23H.18M.33S.

   SSSSSSSSS         UUU         UUU      PPPPPPPPPPPP         DDDDDDDDD            UUU         UUU      PPPPPPPPPPPP   
   SSSSSSSSS         UUU         UUU      PPPPPPPPPPPP         DDDDDDDDD            UUU         UUU      PPPPPPPPPPPP   
   SSSSSSSSS         UUU         UUU      PPPPPPPPPPPP         DDDDDDDDD            UUU         UUU      PPPPPPPPPPPP   
SSS         SSS      UUU         UUU      PPP         PPP      DDD      DDD         UUU         UUU      PPP         PPP
SSS         SSS      UUU         UUU      PPP         PPP      DDD      DDD         UUU         UUU      PPP         PPP
SSS         SSS      UUU         UUU      PPP         PPP      DDD      DDD         UUU         UUU      PPP         PPP
SSS                  UUU         UUU      PPP         PPP      DDD         DDD      UUU         UUU      PPP         PPP
SSS                  UUU         UUU      PPP         PPP      DDD         DDD      UUU         UUU      PPP         PPP
SSS                  UUU         UUU      PPP         PPP      DDD         DDD      UUU         UUU      PPP         PPP
   SSSSSSSSS         UUU         UUU      PPPPPPPPPPPP         DDD         DDD      UUU         UUU      PPPPPPPPPPPP   
   SSSSSSSSS         UUU         UUU      PPPPPPPPPPPP         DDD         DDD      UUU         UUU      PPPPPPPPPPPP   
   SSSSSSSSS         UUU         UUU      PPPPPPPPPPPP         DDD         DDD      UUU         UUU      PPPPPPPPPPPP   
            SSS      UUU         UUU      PPP                  DDD         DDD      UUU         UUU      PPP            
            SSS      UUU         UUU      PPP                  DDD         DDD      UUU         UUU      PPP            
            SSS      UUU         UUU      PPP                  DDD         DDD      UUU         UUU      PPP            
SSS         SSS      UUU         UUU      PPP                  DDD      DDD         UUU         UUU      PPP            
SSS         SSS      UUU         UUU      PPP                  DDD      DDD         UUU         UUU      PPP            
SSS         SSS      UUU         UUU      PPP                  DDD      DDD         UUU         UUU      PPP            
   SSSSSSSSS            UUUUUUUUU         PPP                  DDDDDDDDD               UUUUUUUUU         PPP            
   SSSSSSSSS            UUUUUUUUU         PPP                  DDDDDDDDD               UUUUUUUUU         PPP            
   SSSSSSSSS            UUUUUUUUU         PPP                  DDDDDDDDD               UUUUUUUUU         PPP            

SAIL MRC        06:02:42 Sunday, November 6, 1977   LQ+2D.19H.13M.15S.
SUPDUP.MID[NET,MRC] Created 10:08 Saturday, November 5, 1977   LQ+1D.23H.18M.33S.

MMM         MMM         IIIIIIIII         DDDDDDDDD      
MMM         MMM         IIIIIIIII         DDDDDDDDD      
MMM         MMM         IIIIIIIII         DDDDDDDDD      
MMMMMM   MMMMMM            III            DDD      DDD   
MMMMMM   MMMMMM            III            DDD      DDD   
MMMMMM   MMMMMM            III            DDD      DDD   
MMM   MMM   MMM            III            DDD         DDD
MMM   MMM   MMM            III            DDD         DDD
MMM   MMM   MMM            III            DDD         DDD
MMM   MMM   MMM            III            DDD         DDD
MMM   MMM   MMM            III            DDD         DDD
MMM   MMM   MMM            III            DDD         DDD
MMM         MMM            III            DDD         DDD
MMM         MMM            III            DDD         DDD
MMM         MMM            III            DDD         DDD
MMM         MMM            III            DDD      DDD   
MMM         MMM            III            DDD      DDD   
MMM         MMM            III            DDD      DDD   
MMM         MMM         IIIIIIIII         DDDDDDDDD      
MMM         MMM         IIIIIIIII         DDDDDDDDD      
MMM         MMM         IIIIIIIII         DDDDDDDDD      

SUPDUP.MID[NET,MRC]    MACROS.MID[1,MRC]      SAIDFS.MID[CSP,SYS]


Switch Settings: L[MIDAS] % C 78V 120W X ↑ 
Fonts: F[FIX20.FNT[XGP,SYS],,] 

␈↓&	                                                                 SUPDUP.MID[NET,MRC] 11/06/77  Page 1␈↓'α
  001                   COMMENT ⊗   VALID 00065 PAGES
  002                   C REC  PAGE   DESCRIPTION
  003                   C00001 00001
  004                   C00006 00002	Assembly options, etc.
  005                   C00009 00003	AC's, I/O channels, macros
  006                   C00011 00004	SUPDUP documentation
  007                   C00016 00005	BACKGROUND
  008                   C00021 00006	INITIALIZATION
  009                   C00027 00007	INITIALIZATION (continued)
  010                   C00029 00008	TTYOPT FUNCTION BITS
  011                   C00033 00009	TTYOPT FUNCTION BITS (continued)
  012                   C00036 00010	INPUT -- THE INTELLIGENT TERMINAL PROTOCOL
  013                   C00041 00011	INPUT -- THE INTELLIGENT TERMINAL PROTOCOL (continued)
  014                   C00045 00012	OUTPUT -- DISPLAY PROTOCOL (%TD CODES)
  015                   C00049 00013	OUTPUT -- DISPLAY PROTOCOL (%TD CODES) (continued)
  016                   C00052 00014	OUTPUT -- DISPLAY PROTOCOL (%TD CODES) (continued)
  017                   C00054 00015	STANFORD/ITS CHARACTER SET
  018                   C00057 00016	STANFORD/ITS CHARACTER SET (continued)
  019                   C00060 00017	ACKNOWLEDGEMENTS
  020                   C00062 00018	SUPDUP.MRC[UP,DOC]
  021                   C00067 00019	 SUPDUP FEATURES:
  022                   C00071 00020	 Everything nobody wanted to know about SUPDUP's internal mappings
  023                   C00074 00021	ITS TTY definitions
  024                   C00078 00022	ITS output buffer codes
  025                   C00080 00023	SAIL system definitions
  026                   C00084 00024	Data area
  027                   C00087 00025	 IMP MTAPE command words
  028                   C00089 00026	Display crufties
  029                   C00092 00027	 More display data stuff
  030                   C00095 00028	UUO server
  031                   C00099 00029	Interrupt server
  032                   C00102 00030	Startup, etc.
  033                   C00105 00031	 Initial terminal setup
  034                   C00108 00032	Monitor command processor
  035                   C00110 00033	Get host name
  036                   C00113 00034	ICP ICP ICP
  037                   C00116 00035	 Get socket number from logger
  038                   C00120 00036	Final pre-display initialization
  039                   C00122 00037	Slurp up and send terminal ID
  040                   C00125 00038	 Now search for terminal
  041                   C00129 00039	Initialize screen
  042                   C00132 00040	Main program loop, clock interrupt
  043                   C00134 00041	TTY input service
  044                   C00137 00042	 Output a character to the network buffer in the hairy way
  045                   C00140 00043	 More output mapping stuff
  046                   C00144 00044	Network input service
  047                   C00148 00045	 Check for other display stuff
  048                   C00150 00046	 Subroutines for network input service
  049                   C00153 00047	Display hacking
  050                   C00156 00048	Display subroutines
  051                   C00159 00049	 Non-insert/delete display subroutines
  052                   C00163 00050	 More display subroutines
  053                   C00165 00051	 Line insert/delete
  054                   C00169 00052	 Character insert
  055                   C00172 00053	 Character delete
  056                   C00175 00054	Display update subroutines
  057                   C00179 00055	 More display updating stuff
  058                   C00182 00056	DM display routines
  059                   C00187 00057	SUPDUP commands
  060                   C00189 00058	 Display only commands
  061                   C00192 00059	 Esoteric character mappings (all magical)
  062                   C00195 00060	 Magic DDT command, subroutines, etc.
  063                   C00197 00061	 SUPDUP help text
  064                   C00199 00062	Screen record crock
  065                   C00202 00063	Network error analysis
  066                   C00204 00064	 More network error reporting
  067                   C00207 00065	Random routines, literals, etc.
  068                   C00210 ENDMK
  069                   C⊗;
␈↓&	Assembly options, etc.                                           SUPDUP.MID[NET,MRC] 11/06/77  Page 2␈↓'α
  001                   subttl Assembly options, etc.
  002                   
  003          030 007  title SUPDUP
  004                   
  005                   ; Mark Crispin, SU-AI, November 1977
  006                   
  007                   ;  This is the SAIL implementation of the ITS SUPDUP program, which is used
  008                   ; for display communication across ITS systems.  The protocol is described
  009                   ; in RFC 734, NIC 41953.
  010                   
  011                   .nstgw					; no storage words allowed
  012                   
  013                   if2,[	; Second time through just print switch settings
  014          024 049   swprint \pdllen,words of PDL storage.
  015          024 007   swprint \<pgmbeg-corbeg>,words impure storage.
  016          028 021   swprint \<sdpff-pgmbeg>,words pure storage.
  017          003 023   swprint \dmbufl,words DM buffer storage.
  018          017 019   swprint \icpskt,is the ICP socket.
  019                   
  020                    radix 10.				; print these in decimal
  021                   
  022          026 061   swprint \nlines,maximum lines in screen matrix.
  023          026 061   swprint \linel,maximum characters in screen matrix.
  024          003 023   swprint \nlnglt,line(s) per glitch when scrolling.
  025          026 061   swprint \nlnupd,minimum lines changed to cause full screen update.
  026          011 050   swprint \nsclin,seconds between clock interrupts.
  027                   
  028                    radix 8.				; back to octal
  029                   
  030                   .hkill icp,net,dsk			; so DDT doesn't confuse these
  031                   					; with AC's on typeout
  032                   ];if2
  033                   
  034                   if1,[	; First time through define all macros, symbols, etc.
  035                   
  036                   ; Canonical macro library
  037                   
  038                   .insrt MACROS[1,MRC]
  039                   
  040                   ; Assembly switches
  041                   
  042          010 013  swdef. [dbugp==0]Set ≠ 0 for paranoia halts
  043          010 013  swdef. [ddtp==-1]Set ≠ 0 for DDT hacking and print warnings
  044                   
  045  MACROS  004 023  nd. icpskt==137				; new SUPDUP ICP socket
  046  MACROS  004 023  nd. pdllen==50				; length of pushdown stack
  047  MACROS  004 023  nd. dmbufl==200				; words of DM buffer space
  048  MACROS  004 023  nd. nlines==40.				; maximum number of lines on screen
  049  MACROS  004 023  nd. linel==88.				; maximum number of characters
  050  MACROS  004 023  nd. nlnglt==1				; number of lines to glitch when scrolling
  051  MACROS  004 023  nd. nsclin==3.				; number of seconds for clock interrupt
  052  MACROS  004 023  nd. nlnupd==4.				; number of lines that cause screen update
  053                   					; instead of updating individual lines
  054                   
  055          002 049  nchars==<<<linel+5>/5>*5>		; # chars/line; must be a multiple of 5
␈↓&	AC's, I/O channels, macros                                       SUPDUP.MID[NET,MRC] 11/06/77  Page 3␈↓'α
  001                   subttl AC's, I/O channels, macros
  002                   
  003                   ; Accumulators
  004                   
  005                   ;  I is an interrupt level AC and may not be used anywhere else.  Things
  006                   ; depend on the order of X, Y, Z, and A being consecutive.  U and T are
  007                   ; used at UUO level.  U, V, and W are also used in IMP status interrupts
  008                   ; and must be consecutive.
  009                    
  010  MACROS  004 035  acdef. [x y z a b c i t u v w]
  011                   
  012                   ; I/O channels
  013                   
  014                   ;  ICP is used for ICP'ing only, NET is the general network work channel,
  015                   ; DSK is used for reading ROOMS[P,DOC] and for recording the screen.
  016                   
  017  MACROS  004 035  acdef. [icp net dsk]
  018                   
  019                   ; Macros
  020                   
  021                   ; Print out switch settings
  022                   
  023                   define swprint value,line/
  024                    printx/value line
  025                   /
  026                   termin
  027                   
  028                   ; Map character in ac to char2 if it contains char1 now
  029                   
  030                   define mapit ac,char1,char2
  031                    caxn ac,char1
  032  MACROS  008 050    jrst [movx ac,char2
  033  MACROS  003 059  	return]
  034                   termin
  035                   
  036                   ; Generate a Data Disc command
  037                   
  038                   define ddcmd o1,d1,o2,d2,o3,d3
  039                    .byte 8.,8.,8.,3.,3.,3.,3.
  040                     d1 ? d2 ? d3 ? o1 ? o2 ? o3 ? 4
  041                    .byte
  042                   termin
  043                   
  044                   ; Send a DM command character
  045                   
  046                   define dmcmd ch
  047          027 060   move x,dmcnt
  048                    caxge x,10
  049          056 048    call dmout
  050  MACROS  008 050   movx x,177
  051          056 005   call dmchar
  052  MACROS  008 050   movx x,ch
  053          056 005   call dmchar
  054                   termin
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 4␈↓'α
  001                   subttl SUPDUP documentation
  002                   
  003                   COMMENT ⊗
  004                   
  005                   NWG/RFC# 734				        MRC 07-OCT-77 08:46  41953
  006          030 007  SUPDUP Display Protocol
  007                   
  008                   Network Working Group					      Mark Crispin
  009                   Request for Comments 734					     SU-AI
  010                   NIC 41953						    7 October 1977
  011                   
  012          030 007  			  SUPDUP Protocol
  013                   
  014          018 006  INTRODUCTION
  015                   
  016          030 007  This document describes  the SUPDUP protocol,  a highly efficient  display
  017          017 013  telnet protocol.  It originally started as a private protocol between  the
  018          058 020  ITS systems at MIT to allow a user at any one of these systems to use  one
  019          030 007  of the others as a display.  At the current writing, SUPDUP user  programs
  020                   also exist  for  Data  Disc  and  Datamedia  displays  at  SU-AI  and  for
  021          030 007  Datamedias at SRI-KL.  The author is not aware of any SUPDUP servers other
  022          058 020  than at the four MIT ITS sites.
  023                   
  024          030 007  The advantage  of  the  SUPDUP  protocol  over  an  individual  terminal's
  025          030 007  protocol is that SUPDUP defines a "virtual" or "software" display terminal
  026          017 019  that implements relevant  cursor motion operations.   The protocol is  not
  027          010 013  built on  any  particular  display  terminal but  rather  on  the  set  of
  028                   functions common to all display terminals; hence it is completely  device-
  029  SAIDFS  001 055  independent.  In addition, the protocol also provides for terminals  which
  030          017 013  cannot handle certain operations, such as line or character insert/delete.
  031          019 039  In fact,  it is  more than  this.   It provides  for terminals  which  are
  032          019 001  missing any set of features, all the way down to model 33 Teletypes.
  033                   
  034          030 007  The advantage over the TELNET protocol  is that SUPDUP takes advantage  of
  035                   the full  capabilities of  display  terminals, although  it also  has  the
  036  SAIDFS  001 211  ability to run printing terminals.
  037                   
  038          030 007  It is to be  noted that SUPDUP operates  independently from TELNET; it  is
  039  SAIDFS  001 055  not an option to  the TELNET protocol.   In addition, certain  assumptions
  040          019 039  are made about the  server and the user  programs and their  capabilities.
  041          017 019  Specifically, it is  assumed that the  operating system on  a server  host
  042          019 001  provides all the display-oriented features of ITS.  However, a server  may
  043  SAIDFS  001 055  elect not to do certain display operations available in SUPDUP; the SUPDUP
  044          017 019  protocol is far-reaching enough so  that the protocol allows terminals  to
  045          017 013  be handled  as well  as that  host can  handle terminals  in general.   Of
  046  SAIDFS  001 055  course, if a host does not  support display terminals in any special  way,
  047          030 007  there is no point in bothering  to implement a SUPDUP server since  TELNET
  048          017 013  will work just as well.
  049                   
  050          058 020  A more complete description  of the display facilities  of SUPDUP and  ITS
  051                   can be found by FTP'ing the  online file .INFO.;ITS TTY from ARPAnet  host
  052                   MIT-AI (host 206 octal, 134. decimal).  For more information, the  mailing
  053          030 007  address for SUPDUP is "(BUG SUPDUP) at MIT-AI".  If your mail system won't
  054          030 007  allow you to use parentheses, use Bug-SUPDUP@MIT-AI.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 5␈↓'α
  001                   BACKGROUND
  002                   
  003          017 013  The SUPDUP protocol originated as the internal protocol used between parts
  004          058 020  of ITS, and between ITS and "intelligent" terminals.  Over the network,  a
  005                   user host acts like an intelligent terminal programmed for ITS.
  006                   
  007          017 013  The way terminal  output works  in ITS is  as follows:   The user  program
  008          017 013  tells the system to  do various operations,  such as printing  characters,
  009          019 039  clearing the screen, moving the cursor, etc.  These operations are  formed
  010          012 006  into 8-bit characters  (using the  %TD codes described  below) and  stored
  011          017 013  into a  buffer.   At interrupt  level,  as the  terminal  demands  output,
  012          019 039  characters are  removed  from  the buffer  and  translated  into  terminal
  013          019 039  dependent codes.  At this time  padding and cursor motion optimization are
  014                   also done.
  015                   
  016          017 013  In some cases, the interrupt side does not run on the same machine as  the
  017          030 007  user program.  SUPDUP terminals have their "interrupt side" running in the
  018          030 007  user host.  When  SUPDUP is  run between two  ITS's, the  SUPDUP user  and
  019  SAIDFS  001 055  server programs and the network simply move characters from the buffer  in
  020          011 050  the server machine to the buffer in the user machine.  The interrupt  side
  021          017 013  then runs on the user machine just as if the characters had been generated
  022                   locally.
  023                   
  024          030 007  Due to the highly interactive characteristics of both the SUPDUP  protocol
  025          019 039  and the ITS system, all transactions are strictly character at a time  and
  026          017 019  all echoing  is  remote.  In  addition,  all padding  and  cursor  control
  027          020 031  optimization must be done by the user.
  028                   
  029          058 020  Because this is also the internals of ITS, the right to change it any time
  030          017 019  if necessary to provide new features  is reserved by MIT.  In  particular,
  031          017 019  the initial  negotiation  is probably  going  to be  changed  to  transmit
  032          012 006  additional variables, and additional %TD codes  may be added at any  time.
  033                   User programs should ignore those they don't know about.
  034                   
  035          019 039  The following conventions are  used in this  document: function keys  (ie,
  036          019 039  keys which represent a "function"  rather than a "graphic character")  are
  037  SAIDFS  001 055  in upper case in square brackets.  Prefix keys (ie, keys which generate no
  038          019 039  character but  rather are  held  down while  typing another  character  to
  039          019 039  modify that  character)  are  in  upper case  in  angle  brackets.   Hence
  040          005 036  "<CONTROL><META>[LINE FEED]" refers to  the character generated when  both
  041          017 019  the CONTROL and META keys  are held down while a LINE FEED is typed.  Case
  042                   should  be  noted;  <CONTROL>A  refers  to  a  different  character   from
  043                   <CONTROL>a.  Finally, all numbers which  do not explicitly specify a  base
  044          017 019  (ie, octal  or decimal)  should be  read  as octal  unless the  number  is
  045          017 019  immediately followed by a period, in which case it is decimal.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 6␈↓'α
  001                   INITIALIZATION
  002                   
  003          030 007  The SUPDUP server listens on socket 137 octal.  ICP proceeds in the normal
  004          017 019  way for establishing 8-bit connections.   After the ICP is completed,  the
  005          011 012  user side  sends several  parameters to  the server  side in  the form  of
  006          017 013  36.-bit words.  Each  word is  sent through  the 8-bit  connection as  six
  007          017 019  6-bit bytes, most-significant first.  Each byte is in the low-order 6 bits
  008          017 019  of a character.  The first word is the negative of the number of variables
  009          019 039  to follow in the high order 18. bits (the low-order 18. bits are ignored),
  010          024 014  followed by the  values of  the TCTYP,  TTYOPT, TCMXV,  TCMXH, and  TTYROL
  011          019 039  terminal descriptor variables (these  are the names they  are known by  at
  012          019 039  ITS sites).  These  variables are  36.-bit binary numbers  and define  the
  013          005 036  terminal characteristics for the virtual terminal at the REMOTE host.
  014                   
  015          017 019  The count is for future compatability.  If more variables need to be  sent
  016  SAIDFS  001 055  in the future, the server should assume "reasonable" default values if the
  017                   user does not specify them.  PDP-10 fans will recognize the format of  the
  018          017 013  count (ie, -count,,0) as being an  AOBJN pointer.  At the present  writing
  019          019 039  there are five variables hence this word should be -5,,0.
  020                   
  021          024 010  The TCTYP variable defines the terminal type.  It MUST be 7 (%TNSFW).  Any
  022          017 019  other value is a violation of protocol.
  023                   
  024          024 011  The TTYOPT  variable specifies  what capabilities  or options  the  user's
  025  MACROS  004 050  terminal has.  A bit being true implies that the terminal has this option.
  026                   This variable also includes user options which the user may wish to  alter
  027                   at his or her own descretion; these options are included since they may be
  028  SAIDFS  001 055  specified along with the terminal capabilities in the initial negotiation.
  029          024 011  See below for the relevant TTYOPT bits.
  030                   
  031          026 061  The TCMXV variable specifies the screen height in number of lines.
  032                   
  033          024 013  The TCMXH variable specifies the line width in number of characters.  This
  034          058 020  value is one less  than the screen width  (ITS indicates line overflow  by
  035  MACROS  004 015  outputting an exclamation  point at  the end  of the  display line  before
  036                   moving to the  next line).  Note:  the terminal must  not do an  automatic
  037          017 019  CRLF when a  character is  printed in the  rightmost column.   If this  is
  038          030 007  unavoidable, the user SUPDUP must decrement the width it sends by one.
  039                   
  040          024 013  Note: Setting either the TCMXV or  TCMXH dimension greater than 128.  will
  041          019 039  work, but will have some problems as coordinates are sometimes represented
  042          030 007  in only  7 bits.   The main  problems occur  in the  SUPDUP protocol  when
  043          058 020  sending the cursor position after an output reset and in ITS user programs
  044          012 006  using the display position codes ↑PH and ↑PV.
  045                   
  046          017 019  The TTYROL variable specifies the "glitch count" when scrolling.  This  is
  047          017 019  the number of lines to scroll up when scrolling is required.  If zero, the
  048          017 019  terminal is not  capable of  scrolling.  1 is  the usual  value, but  some
  049                   terminals glitch up by more than one line when they scroll.
  050                   
  051          005 007  Following the transmission of the terminal options by the user, the server
  052          022 013  should respond with an  ASCII greeting message,  terminated with a  %TDNOP
  053          019 039  code (%TD codes are described  below).  All transmissions from the  server
  054          019 039  after the  %TDNOP  are  either printing  characters  or  virtual  terminal
  055                   display codes.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 7␈↓'α
  001                   INITIALIZATION (continued)
  002                   
  003                   The user  and  the  server  now both  communicate  using  the  intelligent
  004          012 006  terminal protocol (described below) from the  user and %TD codes from  the
  005          019 017  server.  The user has two commands in addition to these; they are  escaped
  006          017 019  by sending 300  (octal).  If following  the escape is  a 301 (octal),  the
  007          017 019  server should attempt to  log off the remote  job (generally this is  sent
  008  SAIDFS  001 199  immediately before the user disconnects,  so this logout procedure  should
  009          020 031  be done regardless of the continuing integrity of the connection).  If the
  010          017 019  character following  the escape  is a  302 (octal),  all ASCII  characters
  011          017 013  following up to a null (000  octal) are interpreted as "console  location"
  012          017 013  which the server  can handle as  it pleases.  No  carriage return or  line
  013          017 019  feed should be in the console location text.  Normally this is saved  away
  014                   to be displayed by the "who" command when other users ask where this  user
  015          017 019  is located.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 8␈↓'α
  001          024 011  TTYOPT FUNCTION BITS
  002                   
  003          019 039  The relevant TTYOPT bits for SUPDUP usage follow.  The values are given in
  004  MACROS  004 050  octal, with the left and right 18-bit  halves separated by ",," as in  the
  005                   usual PDP-10 convention.
  006                   
  007  MACROS  004 050  Bit name	Value		Meaning
  008                   
  009          019 039  %TOALT		200000,,0	characters  175  and 176  are converted to
  010          009 018  				altmode (033) on input.
  011                   
  012          017 019  %TOERS		 40000,,0	this  terminal  is capable  of selectively
  013          017 019  				erasing its  screen.  That is, it supports
  014          022 009  				the %TDEOL,  the %TDDLF,  and (optionally)
  015          022 007  				the  %TDEOF  operations.   For   terminals
  016          005 036  				which   can   only   do   single-character
  017          021 028  				erasing, see %TOOVR.
  018                   
  019          017 019  %TOMVB		 10000,,0	this  terminal  is capable of  backspacing
  020  SAIDFS  001 310  				(ie, moving the cursor backwards).
  021                   
  022          058 020  %TOSAI		  4000,,0	this   terminal   has   the   Stanford/ITS
  023          005 036  				extended ASCII graphics character set.
  024                   
  025          017 019  %TOOVR		  1000,,0	this terminal is  capable of overprinting;
  026          019 039  				if  two  characters  are  displayed in the
  027                   				same  position, they will both be visible,
  028                   				rather than one replacing the other.
  029                   
  030                   				Lack of this capability but the capability
  031          021 025  				to backspace (see %TOMVB) implies that the
  032          005 036  				terminal can  do single  character erasing
  033                   				by overstriking with a space.  This allows
  034          021 023  				terminals without the %TOERS capability to
  035          017 013  				have display-style "rubout processing", as
  036          021 023  				this capability depends upon either %TOERS
  037          021 028  				or [%TOMVB and not %TOOVR].
  038                   
  039          017 019  %TOMVU		   400,,0	this terminal  is capable  of  moving  the
  040  SAIDFS  001 310  				cursor upwards.
  041                   
  042          017 019  %TOLWR		    20,,0	this  terminal's  keyboard is  capable  of
  043                   				generating lowercase characters;  this bit
  044          017 019  				is mostly provided for programs which want
  045                   				to know this information.
  046                   
  047          017 019  %TOFCI		    10,,0	this  terminal's  keyboard is  capable  of
  048          017 013  				generating  CONTROL and META characters as
  049                   				described below.
  050                   
  051          017 019  %TOLID		     2,,0	this  terminal  is  capable  of doing line
  052                   				insert/delete operations,  ie, it supports
  053          022 025  				%TDILP and %TDDLP.
  054                   
  055          017 019  %TOCID		     1,,0	this   terminal   is   capable   of  doing
  056          005 036  				character insert/delete operations, ie, it
  057          022 027  				supports %TDICP and %TDDCP.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 9␈↓'α
  001          024 011  TTYOPT FUNCTION BITS (continued)
  002                   
  003  MACROS  004 050  Bit name	Value		Meaning
  004                   
  005          017 019  %TPCBS		     0,,40	this terminal is  using  the  "intelligent
  006                   				terminal protocol".
  007  MACROS  004 050  				 THIS BIT MUST BE ON.
  008                   
  009          008 035  %TPORS		     0,,10	the server should  process  output  resets
  010                   				instead of ignoring them.
  011          017 019  				 IT IS HIGHLY RECOMMENDED THAT THIS BIT BE
  012                   				ON; OTHERWISE THERE MAY BE LARGE DELAYS IN
  013  SAIDFS  001 064  				ABORTING OUTPUT.
  014                   
  015                   
  016                   
  017          019 039  The following bits are user  option bits.  They may be  set or not set  at
  018          019 039  the user's discretion.  The bits that are labelled "normally on" are those
  019          017 019  that are normally  set on when  a terminal is  initialized (ie, by  typing
  020  MACROS  003 058  [CALL] on a local terminal).
  021                   
  022  MACROS  004 050  Bit name	Value		Meaning
  023                   
  024          021 022  %TOCLC		100000,,0	convert  lower-case  input to  upper case.
  025  SAIDFS  001 275  				Many  terminals  have  a  "shift lock" key
  026                   				which makes this option useless.
  027                   				 NORMALLY OFF.
  028                   
  029          005 036  %TOSA1		  2000,,0	characters  001-037  should  be  displayed
  030          058 020  				using  the  Stanford/ITS  extended   ASCII
  031          010 013  				graphics character set instead of  uparrow
  032          005 007  				followed by 100+character.
  033                   				 NORMALLY OFF.
  034                   
  035          021 030  %TOMOR		   200,,0	the   system   should  provide  "**MORE**"
  036          008 035  				processing when  the  cursor  reaches  the
  037          026 061  				bottom  line  of  the  screen.    **MORE**
  038          058 020  				processing is described in ITS TTY.
  039                   				 NORMALLY ON.
  040                   
  041          021 031  %TOROL		   100,,0	the terminal should scroll when attempting
  042          026 061  				output below the bottom line of the screen
  043                   				instead of wrapping around to the top.
  044                   				 NORMALLY OFF.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 10␈↓'α
  001  SAIDFS  001 063  INPUT -- THE INTELLIGENT TERMINAL PROTOCOL
  002                   
  003                   Note: only  the parts  of the  intelligent terminal  protocol relevant  to
  004          058 020  SUPDUP are discussed here.  For more information, read ITS TTY.
  005                   
  006                   
  007          005 036  CHARACTER SETS
  008                   
  009          019 039  There are two  character sets  available for  use with  SUPDUP; the  7-bit
  010          005 036  character set of standard ASCII, and the 12-bit character set of  extended
  011          009 018  ASCII.  Extended ASCII has 5 high order  or "bucky" bits on input and  has
  012          058 020  graphics for octal 000-037 and 177 (see the section entitled "Stanford/ITS
  013          019 039  character set" for more details).  The two character sets are identical on
  014  SAIDFS  001 311  output since the protocol  specifies that the host  should never send  the
  015          017 013  standard ASCII  formatting  characters  (ie,  TAB,  LF,  VT,  FF,  CR)  as
  016                   formatting characters; the characters whose  octal values are the same  as
  017          019 039  these formatting characters are never output unless the user job has these
  018          021 027  characters enabled (setting %TOSAI and %TOSA1 generally does this).
  019                   
  020          005 036  Input differs dramatically  between the 7-bit  and 12-bit character  sets.
  021          017 019  In the 7-bit character set, all characters input whose value is 037  octal
  022          019 039  or less  are assumed  to be  (ASCII) control  characters.  In  the  12-bit
  023          019 039  character set,  there are  5 "bucky"  bits which  may be  attached to  the
  024          019 039  character.  The two most  important of these are  CONTROL and META,  which
  025          017 019  form a 9-bit character set.  TOP  is used to distinguish between  printing
  026          005 036  graphics in the extended character set and ASCII controls.  The other  two
  027          019 039  are reserved and should be ignored.  Since both 7-bit and 12-bit terminals
  028          019 039  are commonly in use, 0001, 0301, and 0341 are considered to be  <CONTROL>A
  029          017 019  on input by most programs, while 4001 is considered to be downwards arrow.
  030                   
  031                   
  032          019 003  MAPPING BETWEEN CHARACTER SETS
  033                   
  034  MACROS  004 050  Many programs and hosts do not process 12-bit input.  In this case, 12-bit
  035          019 039  input is folded down to 7-bit as follows: TOP and META are discarded.   If
  036          017 019  CONTROL is on, then if the 7-bit  part of the character specifies a  lower
  037          017 019  case alphabetic it is converted to upper  case; then if the 7-bit part  is
  038          017 019  between 077 and 137 the  100 bit is complemented or  if the 7-bit part  is
  039          017 019  040 the 040 bit is subtracted  (that's right, <CONTROL>?  is converted  to
  040          017 019  [RUBOUT] and <CONTROL>[SPACE] is  converted to [NULL]).   In any case  the
  041          017 013  CONTROL bit is discarded,  and the remainder is  treated as a 7-bit  ASCII
  042          017 019  character.  It should be noted that  in this case downwards arrow is  read
  043          017 013  by the program as standard ASCII <CONTROL>A.
  044                   
  045          019 039  Servers which expect 12-bit input and are told to use the 7-bit  character
  046          005 036  set should  do  appropriate unfolding  from  the 7-bit  character  set  to
  047          017 019  12-bit.  It is up  to the individual server  to decide upon the  unfolding
  048          058 020  scheme.  On ITS, user programs that use the 12-bit character set generally
  049                   have an alternative method for 7-bit; this often takes the form of  prefix
  050          005 036  characters indicating that the next character should be "controllified" or
  051                   "metized", etc.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 11␈↓'α
  001  SAIDFS  001 063  INPUT -- THE INTELLIGENT TERMINAL PROTOCOL (continued)
  002                   
  003                   
  004          011 029  BUCKY BITS
  005                   
  006          019 039  Under normal circumstances, characters input from the keyboard are sent to
  007          019 039  the foreign host as is.  There  are two exceptions; the first occurs  when
  008          017 019  an octal 034  character is to  be sent; it  must be quoted  by being  sent
  009          019 017  twice, because 034 is used as  an escape character for protocol  commands.
  010          017 019  The second  exception occurs  when  %TOFCI is  set  and a  character  with
  011          017 019  non-zero bucky bits is to be sent.  In this case, the character, which  is
  012  MACROS  004 050  in the 12-bit form:
  013                   
  014                   Name	Value	Description
  015                   
  016          005 036  %TXTOP	4000	This character has the [TOP] key depressed.
  017                   
  018          021 069  %TXSFL	2000	Reserved, must be zero.
  019                   
  020          021 068  %TXSFT	1000	Reserved, must be zero.
  021                   
  022          005 036  %TXMTA	 400	This character has the [META] key depressed.
  023                   
  024          005 036  %TXCTL	 200	This character has the [CONTROL] key depressed.
  025                   
  026          005 036  %TXASC	 177	The ASCII portion of the character
  027                   
  028          017 019  is sent as three bytes.  The first  byte is always 034 octal (that is  why
  029          011 029  034 must be  quoted).  The next  byte contains the  "bucky bits", ie,  the
  030          021 070  %TXTOP through %TXCTL bits,  shifted over 7 bits  (ie, %TXTOP becomes  20)
  031          021 065  with the 100  bit on.   The third  byte contains  the %TXASC  part of  the
  032          017 013  character.  Hence the character <CONTROL><META>[LINE FEED] is sent as  034
  033                   103 012.
  034                   
  035                   
  036  SAIDFS  001 064  OUTPUT RESETS
  037                   
  038          017 019  The  intelligent  terminal  protocol  also  is  involved  when  a  network
  039          017 019  interrupt (INR/INS) is  received by  the user program.   The user  program
  040          006 046  should increment a count of received network interrupts when this happens.
  041  SAIDFS  001 055  It should not do any output, and if possible abort any output in progress,
  042          017 019  if this count is greater than zero  (NOTE: the program MUST allow for  the
  043          006 046  count to go less than zero).
  044                   
  045          017 019  Since the server  no longer  knows where the  cursor is,  it suspends  all
  046  SAIDFS  001 310  output until the user informs it of the cursor position.  This also  gives
  047  SAIDFS  001 055  the server an idea of how much was thrown out in case it has to have  some
  048  SAIDFS  001 064  of the aborted output  displayed at a later  time.  The user program  does
  049          022 017  this when it  receives a  %TDORS from the  server.  When  this happens  it
  050          006 046  should  decrement  the  "number  of  received  network  interrupts"  count
  051          005 007  described in the previous paragraph and then send 034 followed by 020, the
  052  SAIDFS  001 310  vertical position,  and  the  horizontal  position  of  where  the  cursor
  053          026 061  currently is located on the user's screen.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 12␈↓'α
  001          012 006  OUTPUT -- DISPLAY PROTOCOL (%TD CODES)
  002                   
  003          019 039  Display output  is  somewhat  simpler.   Codes less  than  200  octal  are
  004          019 039  printing characters and  are displayed  on the terminal  (see the  section
  005          058 020  describing the "Stanford/ITS character set").  Codes greater than or equal
  006          017 013  to 200 (octal) are known as "%TD codes", so called since their names begin
  007          019 039  with %TD.  The %TD codes that are relevant to SUPDUP operation are  listed
  008  MACROS  009 004  here.  Any other code  received should be ignored,  although a bug  report
  009          006 036  might be sent  to the server's  maintainers.  Note that  the normal  ASCII
  010          005 036  formatting characters (011 - 015) do NOT have their formatting sense under
  011          058 020  SUPDUP and should not occur at all unless the Stanford/ITS extended  ASCII
  012          024 011  character set is in use (ie, %TOSAI is set in the TTYOPT word).
  013                   
  014          017 019  For cursor  positioning operations,  the  top left  corner is  (0,0),  ie,
  015                   vertical position 0, horizontal position 0.
  016                   
  017  MACROS  009 004  %TD code	Value		Meaning
  018                   
  019          005 007  %TDMOV		200		General cursor position code.  Followed by
  020                   				four bytes;  the  first  two are the "old"
  021                   				vertical  and horizontal positions and may
  022          019 039  				be  ignored.    The  next  two are the new
  023                   				vertical  and  horizontal  positions.  The
  024  SAIDFS  001 310  				cursor  should be moved  to this position.
  025                   
  026          021 029  				On printing consoles (non %TOMVU), the old
  027                   				vertical position may differ from the true
  028                   				vertical position;  this  can  occur  when
  029  SAIDFS  001 055  				scrolling.  In this case, the user program
  030          058 020  				should set  its  idea of the old  vertical
  031          022 005  				position to what the %TDMOV says and  then
  032          026 011  				proceed.  Hence a %TDMOV with an old  vpos
  033          026 011  				of 20. and a new vpos of 22. should always
  034          017 019  				move the "cursor" down two lines.  This is
  035                   				used to prevent the vertical position from
  036                   				becoming infinite.
  037                   
  038  MACROS  009 004  %TDMV1		201		An  internal  cursor  motion  code   which
  039                   				should not be seen;  but if it is,  it has
  040                   				two  argument bytes after it and should be
  041          017 013  				treated the same as %TDMV0.
  042                   
  043          017 019  %TDEOF		202		Erase  to  end  of  screen.   This  is  an
  044                   				optional function  since many terminals do
  045                   				not support this.   If  the terminal  does
  046                   				not  support this  function,  it should be
  047          017 013  				treated the same as %TDEOL.
  048                   
  049  MACROS  004 015  				%TDEOF does an erase to end of line,  then
  050          026 061  				erases  all lines lower on the screen than
  051  SAIDFS  001 310  				the cursor.  The cursor does not move.
  052                   
  053  MACROS  004 015  %TDEOL		203		Erase  to  end  of  line.  This erases the
  054          017 019  				character position the  cursor  is at  and
  055          009 018  				all  positions  to the right on  the  same
  056  SAIDFS  001 310  				line.  The cursor does not move.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 13␈↓'α
  001          012 006  OUTPUT -- DISPLAY PROTOCOL (%TD CODES) (continued)
  002                   
  003  MACROS  009 004  %TD code	Value		Meaning
  004                   
  005          017 019  %TDDLF		204		Clear the character position the cursor is
  006  SAIDFS  001 310  				on.  The cursor does not move.
  007                   
  008          017 019  %TDCRL		207		If the cursor is not on the bottom line of
  009          026 061  				the screen, move  cursor to  the beginning
  010                   				of the next line and clear that line.   If
  011          017 019  				the  cursor is at the bottom line,  scroll
  012                   				up.
  013                   
  014          022 013  %TDNOP		210		No-op; should be ignored.
  015                   
  016          017 013  %TDORS		214		Output reset.   This code serves as a data
  017          017 013  				mark for  aborting  output much as  IAC DM
  018  SAIDFS  001 055  				does in the ordinary TELNET protocol.
  019                   
  020          017 019  %TDQOT		215		Quotes the following  character.   This is
  021          019 039  				used  when sending 8-bit codes  which  are
  022          012 006  				not  %TD codes,  for instance when loading
  023                   				programs  into  an  intelligent  terminal.
  024          005 007  				The  following  character should be passed
  025                   				through intact to the terminal.
  026                   
  027          022 019  %TDFS		216		Non-destructive forward space.  The cursor
  028                   				moves right one position;  this  code will
  029  MACROS  004 015  				not be sent at the end of a line.
  030                   
  031          005 007  %TDMV0		217		General cursor position code.  Followed by
  032                   				two bytes; the new vertical and horizontal
  033                   				positions.
  034                   
  035          026 061  %TDCLR		220		Erase the screen.   Home the cursor to the
  036          026 061  				top left hand corner of the screen.
  037                   
  038          022 022  %TDBEL		221		Generate an audio tone, bell, whatever.
  039                   
  040          022 024  %TDILP		223		Insert blank lines at the cursor; followed
  041          006 046  				by a byte containing a count of the number
  042          017 019  				of blank lines to insert.   The  cursor is
  043          017 019  				unmoved.   The line the cursor is  on  and
  044                   				all lines below it move down;  lines moved
  045          019 039  				off the bottom of the screen are lost.
  046                   
  047          022 025  %TDDLP		224		Delete lines at the cursor;  followed by a
  048          017 019  				count.  The cursor is unmoved.   The first
  049          017 019  				line  deleted is the  one the cursor is on.
  050                   				Lines below those deleted move up.  Newly-
  051          026 061  				created lines  at the bottom of the screen
  052          019 039  				are blank.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 14␈↓'α
  001          012 006  OUTPUT -- DISPLAY PROTOCOL (%TD CODES) (continued)
  002                   
  003  MACROS  009 004  %TD code	Value		Meaning
  004                   
  005          005 036  %TDICP		225		Insert  blank  character  positions at the
  006                   				cursor;  followed by  a count.  The cursor
  007          017 019  				is unmoved.   The character the  cursor is
  008          009 018  				on and all characters to the right  on the
  009                   				current line move to the right; characters
  010          019 039  				moved off the end of the line are lost.
  011                   
  012          005 036  %TDDCP		226		Delete characters at the cursor;  followed
  013          017 019  				by a count.   The cursor is unmoved.   The
  014          017 019  				first  character  deleted  is the  one the
  015          017 019  				cursor is on.  Newly-created characters at
  016          019 039  				the end of the line are blank.
  017                   
  018          026 061  %TDBOW		227		Display black characters on white screen.
  019                   				HIGHLY OPTIONAL.
  020                   
  021          022 028  %TDRST		230		Reset %TDBOW and such any future options.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 15␈↓'α
  001          058 020  STANFORD/ITS CHARACTER SET
  002                   
  003          005 036  This section describes the extended  ASCII character set.   It  originated
  004          010 013  with the character set developed at SAIL but was modified for 1968 ASCII.
  005                   
  006          021 034  This character set only  applies to terminals with  the %TOSAI and  %TOFCI
  007          024 011  bits set in its TTYOPT word.  For non-%TOSAI terminals, the standard ASCII
  008          019 039  printing  characters  are  the  only  available  output  characters.   For
  009          019 039  non-%TOFCI terminals, the standard ASCII characters are the only available
  010          005 036  input characters.
  011                   
  012                   
  013          005 036  PRINTING CHARACTERS
  014                   
  015  MACROS  004 050  The first table describes the printing characters.  For output, the  7-bit
  016          019 039  code is sent (terminal operations are performed by %TD codes).  For input,
  017          009 018  the characters with values 000-037 and 177 must have the %TXTOP bit on  to
  018          017 019  indicate the graphic is intended rather than a function or ASCII control.
  019                   
  020          005 036  Value	Character
  021                   
  022                    4000	centered dot
  023                    4001	downward arrow
  024                    4002	alpha
  025                    4003	beta
  026                    4004	logical AND
  027                    4005	logical NOT
  028                    4006	epsilon
  029                    4007	pi
  030                    4010	lambda
  031                    4011	gamma
  032                    4012	delta
  033                    4013	uparrow
  034                    4014	plus-minus
  035                    4015	circle-plus
  036                    4016	infinity
  037                    4017	partial delta
  038                    4020	proper subset (left horseshoe)
  039                    4021	proper superset (right horseshoe)
  040                    4022	intersection (up horseshoe)
  041                    4023	union (downward horseshoe)
  042                    4024	universal quantifer
  043                    4025	existential quantifier
  044                    4026	circle-X
  045                    4027	double arrow
  046                    4030	left arrow
  047                    4031	right arrow
  048                    4032	not-equal
  049                    4033	lozenge (diamond)
  050                    4034	less-than-or-equal
  051                    4035	greater-than-or-equal
  052                    4036	equivalence
  053                    4037	logical OR
  054          005 036   0040	first standard ASCII character (space)
  055                     ..		. . .
  056          005 036   0176	last standard ASCII character (tilde)
  057                    4177	integral
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 16␈↓'α
  001          058 020  STANFORD/ITS CHARACTER SET (continued)
  002                   
  003                   
  004          005 036  FUNCTION KEYS AND SPECIAL CHARACTERS
  005                   
  006          005 007  In addition, the following special characters exist for input only.  These
  007          019 039  characters are  function keys  rather than  printing characters;  however,
  008          005 036  some of these  characters have some  format effect or  graphic which  they
  009                   echo as; the host, not the SUPDUP program, handles any such mappings.
  010                   
  011          005 036  Value	Character	Usual echo		Usual Function
  012                   
  013                    0000	[NULL]
  014                    0010	[BACK SPACE]				text formatting
  015                    0011	[TAB]					text formatting
  016                    0012	[LINE FEED]				text formatting
  017                    0013	[VT]					text formatting
  018          011 012   0014	[FORM]					text formatting
  019  MACROS  003 059   0015	[RETURN]				text formatting
  020  MACROS  003 058   0032	[CALL]		uparrow-Z		escape to system
  021                    0033	[ALTMODE]	lozenge or $		special activation
  022          019 017   0037	[BACK NEXT]	uparrow-underscore	monitor command prefix
  023          005 036   0177	[RUBOUT]				character delete
  024                   
  025          019 017   4101	[ESCAPE]				local terminal command
  026                    4102	[BREAK]					local subsystem escape
  027                    4103	[CLEAR]
  028                    4110	[HELP]					requests a help message
  029                   
  030                   
  031          011 029  BUCKY BITS
  032                   
  033          005 007  For all input characters, the following  "bucky bits" may be added to  the
  034          017 019  character.  Their interpretation depends entirely upon the host.  <TOP> is
  035          017 013  not listed here, as it  has been considered part  of the character in  the
  036                   previous  tables.
  037                   
  038          017 019  <CONTROL> is different from ASCII CTRL, however, many programs may request
  039          005 036  the operating system to map such  characters to the ASCII forms (with  the
  040          017 019  <TOP> bit off).  In this case <META> is ignored.
  041                   
  042                   Value	Key
  043                   
  044                    2000	Reserved
  045                    1000	Reserved
  046                    0400	<META>
  047                    0200	<CONTROL>
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 17␈↓'α
  001                   ACKNOWLEDGEMENTS
  002                   
  003                   Richard M. Stallman (RMS@MIT-AI)  and David A.  Moon (Moon@MIT-MC) of  the
  004          005 035  MIT-AI and MIT-MC  systems staff  wrote the source  documentation and  the
  005          058 020  wonderful ITS terminal support that made this protocol possible.  It  must
  006          017 019  be emphasized  that  this is  a  functional  protocol which  has  been  in
  007                   operation for some years now.
  008                   
  009  SAIDFS  001 055  In addition, Moon,  Stallman, and Michael  McMahon (MMcM@SRI-KL)  provided
  010          005 035  many helpful comments and corrections to this document.
  011                   
  012          030 007  For further reference, the sources for the known currently existing SUPDUP
  013          019 039  user programs are available online as:
  014                   
  015                   [MIT-AI] SYSENG;SUPDUP >		for the ITS monitor,
  016          030 007  [SU-AI]  SUPDUP.MID[NET,MRC]		for the SAIL monitor,
  017                   [SRI-KL] <MMcM>SD.FAI			for the TOPS-20 monitor.
  018                   
  019          030 007  The source for the known currently existing SUPDUP server program is:
  020                   
  021                   [MIT-AI] SYSENG;TELSER >		for the ITS monitor.
  022                   
  023          019 039  These programs  are written  in  the MIDAS  and  FAIL dialects  of  PDP-10
  024                   assembly language.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 18␈↓'α
  001          030 007  SUPDUP.MRC[UP,DOC]
  002                   
  003          058 020  		SUPer-DUPer Display TELNET to ITS
  004                   			  Mark Crispin
  005                   
  006                    INTRODUCTION:
  007                   
  008          017 019  SUPDUP is the SAIL implementation of the ITS SUPDUP program, which is used
  009          058 020  for TELNETing  between ITS  sites.   This program  uses the  internal  ITS
  010          058 020  display codes  for highly  efficient  communication and  full use  of  ITS
  011          030 007  display programs over the ARPAnet.  In addition, SUPDUP allows the user to
  012          058 020  send the full  ITS ASCII  character set  (which includes  some very  hairy
  013          005 036  characters!) and maps  both keyboard input  and display output  so that  a
  014          017 013  Data Disc appears as a funny kind of Knight display.
  015                   
  016          017 019  SUPDUP is intended to  run primarily on Data  Discs and 128-character  set
  017          010 013  DM's.  It will work on ordinary DM's, but due to character set problems  a
  018          058 020  user of an ordinary DM is better  off going directly to ITS using the  TIP
  019          030 007  and saying :TCTYP DATAMEDIA on ITS.  SUPDUP endeavors to allow the user to
  020  MACROS  004 050  send all possible bucky bit characters; some ITS subsystems use some  very
  021          019 039  esoteric characters on  bucky bit  keyboards which are  rather painful  to
  022          058 020  enter on a DM keyboard.  Also, SUPDUP  tells ITS to use the full  graphics
  023          058 020  character set for DM128's.  If instead  one goes directly to ITS  throught
  024          017 019  the TIP the hair is avoided and things stay within ordinary ASCII.
  025                   
  026          017 019  SUPDUP will run on (but is  unsupported for) III's and printing  consoles.
  027          005 036  For printing consoles, ↑E will controllify the next character, and ↑↑ will
  028          019 017  enter command mode.
  029                   
  030          017 019  When SUPDUP is run,  it will prompt  for the host name.   Type one or  two
  031          058 020  characters to identify the name  of the ITS system  you wish to TELNET  to
  032          030 007  (ie, either  "A", "D",  "MC", and  "ML").  SUPDUP  will then  establish  a
  033          058 020  connection  with  the  specified  ITS  site,  and  after  that  you   will
  034          058 020  effectively be a display on ITS, with full bucky bit capability.
  035                   
  036          019 039  Some mappings in input and output are made due to the differences  between
  037          019 039  the SAIL  and  ITS ASCII  character  sets.   Most of  these  mappings  are
  038          019 003  transparent to the user.  The design philsophy behind the mappings was  to
  039          017 013  cause characters typed on the Stanford keyboard  to be seen by ITS as  the
  040          058 020  character appears on the key tops, and for characters received from ITS to
  041          017 013  be displayed as they would be at a console at MIT.
  042                   
  043          006 036  NOTE!!!:
  044                   
  045          058 020  One thing that I should mention: you MUST NOT do a :TCTYP on ITS that will
  046          030 007  set your terminal type.  SUPDUP's operation depends upon the terminal type
  047          017 019  being SOFTWARE and things will not work correctly if it is set to anything
  048          017 013  else.  It  is alright  to set  certain other  TCTYP options  such as  SAIL
  049          010 013  character set enable, however, in general you probably will not want to do
  050          030 007  any TCTYP  at all.   SUPDUP sets  the line  length and  page size  to  the
  051          026 061  maximum possible on the screen.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 19␈↓'α
  001          030 007   SUPDUP FEATURES:
  002                   
  003  SAIDFS  001 064    Visible OUTPUT MAPPINGS:
  004                   
  005          017 019  Caret is  mapped to  AND sign  (∧)  since there  is no  code in  the  SAIL
  006          017 019  character set for caret.   There is no  way to tell  between AND sign  and
  007          019 039  caret.  In addition, centered-dot, gamma,  delta, and circle-plus are  not
  008                   displayed (they generate an error message).
  009                   
  010  SAIDFS  001 063    Visible INPUT MAPPINGS:
  011                   
  012          019 039  αz and αZ are mapped to [CALL], αβz  and αβZ are mapped to α[CALL]; α_  is
  013          017 019  mapped to [BACK NEXT] and  αβ_ is mapped to β[BACK  NEXT]. ↑ is mapped  to
  014                   caret; to send ↑  (distinct from VT) see  below.  Some other more  obscure
  015          005 036  characters must be sent by using a command; see below.
  016                   
  017                     COMMANDS:
  018                   
  019          005 007  [ESCAPE]I is used to enter a  SUPDUP command.  The following commands  are
  020                   defined:
  021                   
  022          021 013  	F	Use Fast display mode (discussed below).
  023          058 020  	K or L	Kill the job on ITS and break network connections.
  024  MACROS  003 054  	P	Temporarily restore the page printer.  Typing any
  025          026 061  		 character will return your screen to ITS.
  026          057 022  	Q	Quit out, close network connections, detach the job
  027          017 019  		 on ITS if there is one.
  028          026 061  	R	Record contents of screen onto a file; asks you for
  029                   		 name of file to write.
  030          021 013  	S	Use Slow display mode (see below).
  031          026 061  	V	Re-draw the current screen.
  032                   	?	Type a help text.
  033                   
  034          058 020  Command mode also allows  some of the more  esoteric ITS characters to  be
  035          019 039  sent.  For example, ↑, α↑, β↑, αβ↑, αz, αβz, αZ, αβZ, α_, and αβ_ are sent
  036          019 003  in image mode without being mapped.   Special mappings exist for keys  not
  037          009 018  on the keyboard or trapped  by the monitor.  They  may be sent with  bucky
  038          017 013  bits, and  they have  no explicit  graphic here  or on  ITS, as  they  are
  039                   special function keys.  These are:
  040                   
  041                    .	centered-dot	[TAB]	gamma		[LF]	delta
  042                    [CR]	circle-plus	[BS]	integral	∂	[NULL]
  043  MACROS  003 058   ␈λ	[BACK SPACE]	≠	[CALL]		∨	[BACK NEXT]
  044                    α	[ESCAPE]	β	[BREAK]		ε	[CLEAR]
  045                   
  046                   DISPLAY MODES:
  047                   
  048          030 007  SUPDUP has two display modes; fast and slow, which are set by the F and  S
  049          017 019  commands.  Fast mode, which is the  default, is highly optimal on  network
  050          009 018  input  and  very  fast  on  display.   On  the  other  hand,  it  can   be
  051          017 013  disconcerting to have  the screen  flash as suddenly  as it  does with  no
  052          017 013  semblance  of   line-  per-line   output  (it   sort  of   comes  out   as
  053          030 007  chunk-per-chunk), therefore, there is a  slow mode which causes SUPDUP  to
  054  SAIDFS  001 055  output in the old-fashioned manner which just does normal optimization but
  055          026 061  not line/screen optimization.
␈↓&	SUPDUP documentation                                             SUPDUP.MID[NET,MRC] 11/06/77  Page 20␈↓'α
  001          019 003   Everything nobody wanted to know about SUPDUP's internal mappings
  002                   
  003          019 003  The following character set mappings are in effect.  These mappings  occur
  004          019 039  on both input and output,  so in general they  are invisible to the  user.
  005          017 019  In particular, the graphic on the keytop is what ITS will see, and what is
  006          058 020  displayed on the screen is what would be displayed on an ITS TV.  But  see
  007          020 050  the second table and notes for exceptions.
  008                   
  009          058 020  	SAIL		ITS
  010                   	----		---
  011                   
  012                     013	 VT		 ↑	(6)
  013                   
  014                     030	 _		 ←
  015                   
  016                     032	 ~		 ≠
  017                   
  018                     033	 ≠		ALT
  019                   
  020                     136	 ↑		 ∧	(2)
  021                   
  022                     137	 ←		 _
  023                   
  024                     175	ALT		 }
  025                   
  026                     176	 }		 ~
  027                   
  028                     177	BS		INT	(1) (6)
  029                   
  030                   
  031          019 039   In addition, the following keyboard mappings are done:
  032                   
  033          058 020  	KBD code	Sent to ITS
  034                   	--- ----	---- -- ---
  035                   
  036  MACROS  003 058  	   αz		   [CALL]	(3)
  037                   
  038  MACROS  003 058  	   αZ		   [CALL]
  039                   
  040  MACROS  003 058  	  αβz		  α[CALL]
  041                   
  042  MACROS  003 058  	  αβZ		  α[CALL]
  043                   
  044                   	   α_		 [BACK NEXT]	(4)
  045                   
  046                   	  αβ_		α[BACK NEXT]
  047                   
  048                   	    ↑		     ∧		(2) (5)
  049                   
  050                    Notes:
  051                   
  052          017 013  (1) This character  is image rubout,  which on  a PDP-11 TV  is output  as
  053                   integral sign.
  054                   
  055          017 019  (2) AND sign  (∧) is used  for caret since  there is no  code in the  SAIL
  056          010 013  character set for caret anyway.
  057                   
  058          011 012  (3) These four mappings are necessary since there is no way that any  form
  059  MACROS  003 058  of [CALL] can be read by a user program.
  060                   
  061          017 019  (4) This mapping is necessary since there is no key remotely equivalent to
  062                   the [BACK NEXT] key.
  063                   
  064          017 019  (5) This mapping  is necessary since  otherwise there is  no way to  enter
  065          058 020  caret from the  keyboard.  As  caret is more  important on  ITS, up  arrow
  066  SAIDFS  001 063  lost.  VT  will input  an up-arrow,  however it  will not  be  [TOP]ified,
  067          021 013  meaning that in order  to enter this  character into TECO  one must use  a
  068          017 013  quoting convention  or  up-arrow  as  a command;  see  previous  page  for
  069                   details.
  070                   
  071          019 003  (6) Output only mapping.
  072                   
  073                   ⊗
␈↓&	ITS TTY definitions                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 21␈↓'α
  001                   subttl ITS TTY definitions
  002                   
  003                   ;  These definitions are the various bits, words, etc. for the ITS terminal
  004                   ; service system calls and are here for convenience and clarity.  This is
  005                   ; abridged from [MIT-AI] SYSTEM;BITS >, the monitor bits definition file.
  006                   
  007                   ; TTYOPT variable (terminal capabilities)
  008                   
  009                   sdttop==0				; for initial value
  010                   
  011                   ; Macro to specify that this bit is used by SUPDUP
  012                   
  013                   define use def/
  014                    def
  015  MACROS  004 050   irps bit,,[def]
  016  MACROS  004 050    sdttop==sdttop\bit
  017                     .istop
  018                    termin
  019                   termin
  020                   
  021                       %toalt==200000,,			; 1 → standardise altmodes
  022                       %toclc==100000,,			; 1 → convert cases on input
  023          021 013  use %toers==040000,,			; 1 → this terminal can erase
  024                       %tohdx==020000,,			; 1 → half duplex
  025          021 013  use %tomvb==010000,,			; 1 → can backspace
  026          021 013  use %tosai==004000,,			; 1 → has SAIL graphics
  027          021 013  use %tosa1==002000,,			; 1 → init %TSSAI in new jobs (use graphics)
  028                       %toovr==001000,,			; 1 → can overprint
  029          021 013  use %tomvu==000400,,			; 1 → can line starve (ie a display)
  030          021 013  use %tomor==000200,,			; 1 → do **More** processing (init %TSMOR)
  031                       %torol==000100,,			; 1 → scroll (init %TSROL for new jobs)
  032                       %toraw==000040,,			; 1 → no cursor motion optimization
  033          021 013  use %tolwr==000020,,			; 1 → lower case keyboard
  034          021 013  use %tofci==000010,,			; 1 → has bucky bit keyboard
  035                       %toiml==000004,,			; 1 → acts like a grIMLAC (funny ↑PF, ↑PB)
  036          021 013  use %tolid==000002,,			; 1 → can insert/delete lines
  037          021 013  use %tocid==000001,,			; 1 → can insert/delete characters
  038                       %tpplf==700000			; LF padding
  039                       %tppcr==070000			; CR padding
  040                       %tpptb==007000			; TAB padding (0 → no tabs, 1 → tabs)
  041                       %tptel==000100			; 1 → CR → CRLF for ARPAnet protocol
  042          021 013  use %tpcbs==000040			; 1 → intelligent terminal protocol (↑\)
  043                       %tp11t==000020			; 1 → PDP-11 TV (reflects %TY11T)
  044          021 013  use %tpors==000010			; 1 → output reset should do something
  045                       %tpibc==000002			; 1 → correspondence code 2741
  046                       %tpibm==000001			; 1 → IBM 2741
  047                   
  048                   ; TCTYP variable (terminal type)
  049                   
  050                   %tnprt==0				; printing console, glass TTY, etc.
  051                   %tndp==1				; good Datapoint
  052                   %tnodp==2				; inferior losing Datapoint
  053                   %tniml==3				; grIMLAC
  054                   %tntek==4				; Tektronix 4000 series
  055                   %tntv==5				; PDP-11 TV
  056                   %tnmem==6				; Memowreck
  057                   %tnsfw==7				; Software
  058                   %tntrm==10				; Terminet
  059                   %tnesc==11				; ASCII standard display (VT52, etc.)
  060                   %tndtm==12				; Datamedia 2500
  061                   %tnmax==13				; 1 + largest terminal type
  062                   
  063                   ; Components of an input character in 12-bit mode.
  064                   
  065                   %txasc==0177				; ASCII part
  066                   %txctl==0200				; control
  067                   %txmta==0400				; meta
  068                   %txsft==1000				; shift
  069                   %txsfl==2000				; shift lock
  070                   %txtop==4000				; top
␈↓&	ITS output buffer codes                                          SUPDUP.MID[NET,MRC] 11/06/77  Page 22␈↓'α
  001                   subttl ITS output buffer codes
  002                   
  003                   ; These are the ITS output buffer codes (used by Software terminals).
  004                   
  005                   %tdmov==200				; move cursor OV OH NV NH
  006                   %tdmv1==201				; move cursor; NV NH
  007                   %tdeof==202				; clear to end of screen
  008                   %tdeol==203				; clear to end of line
  009                   %tddlf==204				; delete character after cursor
  010                   %tdmtf==205				; motor off
  011                   %tdmtn==206				; motor on
  012                   %tdcrl==207				; terpri
  013                   %tdnop==210				; no-op
  014                   %tdbs==211				; backspace
  015                   %tdlf==212				; line feed
  016                   %tdrcr==213				; carriage return
  017                   %tdors==214				; output reset
  018                   %tdqot==215				; quote next character (mystery command)
  019                   %tdfs==216				; cursor forward
  020                   %tdmv0==217				; move cursor NV NH
  021                   %tdclr==220				; clear screen
  022                   %tdbel==221				; feep!
  023                   %tdini==222				; reset reset reset
  024                   %tdilp==223				; insert line; count
  025                   %tddlp==224				; delete line; count
  026                   %tdicp==225				; insert character; count
  027                   %tddcp==226				; delete character; count
  028                   %tdbow==227				; inverse video
  029                   %tdrst==230				; reset inverse video, etc.
  030                   %tdmax==231				; 1 + largest display code
␈↓&	SAIL system definitions                                          SUPDUP.MID[NET,MRC] 11/06/77  Page 23␈↓'α
  001                   subttl SAIL system definitions
  002                   
  003                   ;  First define all the UUO's.  MIDAS has these predefined, but DDT is
  004                   ; cretinous.
  005                   
  006          023 064  .insrt SAIDFS[CSP,SYS]
  007  SAIDFS  001 024  .decdf
  008                   
  009                   ;  This page contains the SAIL system bits that are used within SUPDUP.  It is
  010                   ; not a complete list of the SAIL system bits.
  011                   
  012                   ; SETACT bits
  013                   
  014                   allact==000040				; all αβ characters and BS activate
  015                   bsact==	000020				; all forms of BS activate
  016                   supscm==000004				; all αβ characters activate
  017                   supccr==000002				; αCR is an ordinary character
  018                   
  019                   ; GETLIN/SETLIN bits
  020                   
  021                   dislin==400000,,			; terminal is a III
  022                   dmlin==	040000,,			; terminal is a DM
  023                   dddlin==020000,,			; terminal is a DD
  024                   echarr==010000,,			; terminal echoes arrow for controls
  025                   ptylin==004000,,			; terminal is a PTY
  026                   impbit==001000,,			; terminal is controlled by a network job
  027                   spcbrk==000100,,			; terminal is in special activation mode
  028                   
  029                   ; Interrupt condition bits
  030                   
  031                   inttty==020000,,			; TTY input activation
  032                   intclk==000200,,			; clock interrupt
  033                   intins==000040,,			; IMP INS
  034                   intims==000020,,			; IMP status change
  035                   intinp==000010,,			; IMP input waiting
  036                   inttti==000004,,			; [ESCAPE]I
  037                   
  038                   ; DM UPGIOT flags
  039                   
  040                   trunca==040000,,			; truncate output lines to 80. characters
  041                   noeeol==020000,,			; suppress CEOL when moving to a line
  042                   noeeob==010000,,			; suppress CEOL on blank line
  043                   
  044                   ; Network socket status flags
  045                   
  046                   rfcs==	200000,,			; RFC sent
  047                   rfcr==	100000,,			; RFC received
  048                   clss==	040000,,			; CLS sent
  049                   clsr==	020000,,			; CLS received
  050                   intinr==000100,,			; INR received
  051                   intins==000040,,			; INS received
  052                   
  053                   ; Network I/O status bits
  054                   
  055                   hdead==	002000				; host or destination IMP dead
  056                   ctrov==	001000				; host sent more bits than allocated
  057                   rset==	000400				; host sent a RST
  058                   tmo==	000200				; time out
  059                   
  060                   ; Network status word error codes
  061                   
  062                   siu==	01				; socket in use
  063                   ccs==	02				; can't change socket numbers
  064                   sys==	03				; horrible system error
  065                   nla==	04				; no links available
  066                   ilb==	05				; illegal byte size
  067                   idd==	06				; IMP dead
  068                   
  069                   ; I/O status word error bits
  070                   
  071                   ioimpm==400000				; improper mode
  072                   ioderr==200000				; hard device error (data missed, etc.)
  073                   iodter==100000				; soft device error (parity error, etc.)
  074                   iobktl==040000				; block number out of bounds
  075                   iodend==020000				; end of file
  076                   
  077                   ];if1
␈↓&	Data area                                                        SUPDUP.MID[NET,MRC] 11/06/77  Page 24␈↓'α
  001                   subttl Data area
  002                   
  003                   .ystgw					; storage words okay now
  004                   
  005                   ; Beginning of core area initialized to zero at startup
  006                   
  007                   	corbeg==.			; relocatable zero
  008                   
  009                   cnsblk:	block 1				; CNSGET info
  010                   tctyp:	block 1				; TCTYP for server
  011                   ttyopt:	block 1				; TTYOPT for server
  012                   tcmxv:	block 1				; TTY page length
  013                   tcmxh:	block 1				; TTY width
  014                   ttyrol:	block 1				; TTYROL variable
  015          024 009  cnsbll==.-cnsblk
  016                   
  017                   ; Random flags
  018                   
  019                   dmp:	block 1				; -1 → this is a Datamedia
  020                   ddp:	block 1				; -1 → this is a Data Risc
  021                   iiip:	block 1				; -1 → this is a III
  022                   ptyp:	block 1				; -1 → this is a PTY
  023                   netp:	block 1				; -1 → this is a network PTY
  024                   prtp:	block 1				; -1 → this is a printing console
  025                   filinp:	block 1				; -1 → fill in host name
  026                   runcmp:	block 1				; -1 → called via RUN command
  027                   slowip:	block 1				; -1 → do input slow way
  028                   clsedp:	block 1				; -1 → connection closed by foreign host
  029                   
  030                   ; Interrupt pending flags
  031                   
  032                   ttiinp:	block 1				; -1 → TTI pending
  033                   ntoinp:	block 1				; <0 → INS pending
  034                   ntiinp:	block 1				; -1 → NTI pending
  035                   escpip:	block 1				; -1 → [ESCAPE]I typed
  036                   imgchp:	block 1				; -1 → image characters from command
  037                   ctlfyp:	block 1				; -1 → controllify next character on TTY
  038                   
  039                   ; Buffer headers
  040                   
  041                   ntibf:	block 3				; net input buffer header
  042                   ntobf:	block 3				; net output buffer header
  043                   dsibf:	block 3				; disk input buffer header
  044                   dsobf:	block 3				; disk output buffer header
  045                   
  046                   ; Other random storage
  047                   
  048                   lgrskt:	block 1				; socket from logger
  049          002 046  pdl:	block pdllen			; pushdown stack
  050                   
  051                   ; These two locations must be in this order!!
  052                   
  053                   mskbts:	block 1				; interrupt bits to go on
  054                   retnpc:	block 1				; PC to return to
␈↓&	Data area                                                        SUPDUP.MID[NET,MRC] 11/06/77  Page 25␈↓'α
  001                   ; IMP MTAPE command words
  002                   
  003                   ; Connect to host command block
  004                   
  005                   impcod:	block 1				; command
  006                   impsta:	block 1				; status
  007                   implsk:	block 1				; local socket
  008                   impwat:	block 1				; ≠ 0 → wait for connection
  009                   impbyt:	block 1				; byte size
  010                   impfsk:	block 1				; foreign socket
  011                   imphst:	block 1				; foreign host number
  012                   
  013                   ; Wait for connection to be completed command block
  014                   
  015                   watcod:	block 1				; command
  016                   watsta:	block 1				; status
  017                   watskt:	block 1				; socket
  018                   
  019                   ; Close connection to host command block
  020                   
  021                   clscod:	block 1				; close code
  022                   clssta:	block 1				; close status
  023                   clsskt:	block 1				; close socket
  024                   clswat:	block 1				; ≠ 0 → wait for close
␈↓&	Display crufties                                                 SUPDUP.MID[NET,MRC] 11/06/77  Page 26␈↓'α
  001                   subttl Display crufties
  002                   
  003                   ; Number of words in display frobs
  004                   
  005          002 055  nwrdln==4+nchars/5			; number of words on a line
  006          002 048  scrsiz==nlines*nwrdln			; number of words on screen
  007          002 055  ngw==<<nchars*3>+17.>/16.		; number of graphics words
  008                   
  009                   ; Cursor position pointers
  010                   
  011                   vpos:	block 1				; vertical position
  012                   hpos:	block 1				; horizontal position
  013                   ovpos:	block 1				; old vertical position
  014                   
  015                   ; Positioning flags
  016                   
  017                   govpos:	block 1				; -1 → get old vertical position
  018                   gohpos:	block 1				; -1 → get old horizontal position
  019                   gtvpos:	block 1				; -1 → get vertical position
  020                   gthpos:	block 1				; -1 → get horizontal position
  021                   
  022                   ; Insert/delete mode flags
  023                   
  024                   gtiln:	block 1				; -1 → get # of lines to insert
  025                   gtdln:	block 1				; -1 → get # of lines to delete
  026                   gtich:	block 1				; -1 → get # of characters to insert
  027                   gtdch:	block 1				; -1 → get # of characters to delete
  028                   
  029                   ; Screen updating flags
  030                   
  031          002 048  slupdp:	block nlines			; -1 → this line has changed
  032                   scupdp:	block 1				; -1 → some update happened someplace
  033                   saupdp:	block 1				; -1 → updated whole screen
  034                   crupdp:	block 1				; -1 → updated cursor
  035                   
  036                   corend==.-1				; address of top of core
  037                   
  038                   ; End of core zeroed upon startup
  039                   
  040          002 042  ifn ddtp,debugp: dbugp			; -1 → debugging
  041                   
  042                   ; Various display programs
  043                   
  044                   ; III header word
  045                   
  046                   iiihdr:
  047                   .byte 11.,11.,3.,3.,2.,2.,4.
  048                    -777 ? 640 ? 4 ? 2 ? 1 ? 2 ? 6		; invisible absolute vector
  049                   .byte
  050                   
  051                   ; Erase screen display program
  052                   
  053          003 038  sce:	ddcmd 1,17,1,17,2,0		; erase screen
  054                   	0				; all done
  055          026 053  scel==.-sce
  056                   
  057                   ; Display screen display program
  058                   
  059          003 038  scp:	ddcmd 1,46,4,1,5,10		; line address 30
  060          003 038  	ddcmd 3,2,3,2,3,2		; go to column 2
  061          026 006  screen:	block scrsiz			; TV screen storage
  062                   scrend=.-1				; end of screen storage
  063                   	0				; end of DD program
  064          026 059  scpl==.-scp
  065          026 061  botlin=screen+scrsiz-nwrdln+2-1		; address of start of bottom line
␈↓&	Display crufties                                                 SUPDUP.MID[NET,MRC] 11/06/77  Page 27␈↓'α
  001                   ; More display data stuff
  002                   
  003                   ; Display cursor display program
  004                   
  005          003 038  scc:	ddcmd 1,7,1,7,1,7		; graphics
  006          003 038  	ddcmd 3,1,4,0,5,0		; select position
  007          026 007  	block ngw			; all graphics columns
  008          003 038  	ddcmd 0,0,1,46,1,46		; execute
  009                   	0				; end of program
  010          027 005  sccl==.-scc
  011                   
  012                   ; Line display programs
  013                   
  014          003 038  linprg:	ddcmd 1,46,4,0,5,0		; line update commands
  015          003 038  linpr1:	ddcmd 3,2,3,2,3,2
  016                   
  017                   ; Display commands
  018                   
  019                   ; Clear screen
  020                   
  021          026 053  sclear:	sce				; address of display program
  022          026 055  	scel				; size of display program
  023                   	0 ? 0				; no t-in-p flag, line command addr
  024                   
  025                   ; Display screen
  026                   
  027          026 059  sdisp:	200000,,scp			; two field mode
  028          026 064  	scpl				; size of display program
  029                   	0				; no transfer in progress flag
  030          026 059  	scp				; address of low order line command
  031                   
  032                   ; Cursor display
  033                   
  034          027 005  cdisp:	scc				; address of cursor hacker
  035          027 010  	sccl				; size of the hacker
  036                   	0				; no transfer in progress flag
  037          027 005  	scc+1				; address of low order line command
  038                   
  039                   ; Line display
  040                   
  041                   ldisp:	200000,,0			; two field mode
  042          026 005  	nwrdln				; size of this command
  043                   	0 ? 0				; no t-i-p flag, l.c.a. gets hacked
  044                   
  045                   ; Byte pointer table for insertions
  046                   
  047                   scbytp:	350700,,(y)
  048                   	260700,,(y)
  049                   	170700,,(y)
  050                   	100700,,(y)
  051                   	010700,,(y)
  052                   
  053                   ; DM display programs and stuff
  054                   
  055          027 058  dmdisp:	trunca\noeeol\noeeob+dmpgm	; truncate, no ceol
  056                   	0 ? 0				; # words, t-i-p flag
  057                   
  058          002 047  dmpgm:	block dmbufl			; DM display program
  059                   
  060                   dmcnt:	0				; DM program counter
  061                   dmpnt:	0				; DM program counter
␈↓&	UUO server                                                       SUPDUP.MID[NET,MRC] 11/06/77  Page 28␈↓'α
  001                   subttl UUO server
  002                   
  003                   ; UUO server.  Only allows BURP UUO (op code 037).
  004                   
  005                   ; BURP	[OP=037]
  006                   ; --------------------------------------------------
  007                   ;	BURP ADR
  008                   ;
  009                   ; ADR:	<asciz string>
  010                   ;
  011                   ; The BURP UUO types out the ASCIZ string that starts at location ADR.
  012                   ; If DBUGP was set ≠ 0 during assembly, BURP will halt after typing its
  013                   ; message.  If the DEBUGP runtime switch is set, BURP bops into DDT if
  014                   ; DDT is present; RETURN[ALT]X from DDT attempts to return.  Don't expect
  015                   ; an interrupt level BURP with breakpoints to be continuable.
  016                   ; A non-zero AC field means the error is fatal.
  017                   
  018                   BURP=037000,,				; UUO for logging cruft
  019          028 018  BARF=burp 1,				; UUO for fatalities
  020                   
  021                   pgmbeg==.				; start of pure core
  022                   
  023          028 025  tmploc job41,call uuoser		; UUO server
  024                   
  025  MACROS  003 056  uuoser:	save t ? save u			; save the old UUO AC's
  026  MACROS  003 056  	save jobuuo			; and the UUO itself
  027  MACROS  003 014  	ldb u,[.bp %icopc,jobuuo]	; get op code
  028          028 018  	caxe u,burp←-27.		; was it a BURP UUO?
  029          028 019  	 barf [asciz/Illegal UUO!
  030                   /]					; isn't recursion wonderful?
  031  MACROS  003 015  	ldb u,[.bp %icacf,jobuuo]	; get AC field
  032                   	skipe u				; indicate fatality?
  033  SAIDFS  001 102  	 outstr [asciz/?
  034                   /]					; yes
  035          002 043  ife ddtp,skipe u			; don't print warning messages?
  036  MACROS  003 054  	  outstr @(p)			; no, type the message
  037          002 042  ifn dbugp,jrst 4,.+1			; if paranoia mode set
  038          028 048  	jumpn u,[jrst 4,[call ddtcal ? jrst 4,.+1]]; fatal error
  039          002 043  ifn ddtp,[
  040          026 040  	skipe debugp			; debugging?
  041          028 048  	 call ddtcal			; yes, call DDT
  042                   ];ddtp
  043  MACROS  003 054  	adjsp p,-3			; drop stack
  044  MACROS  003 059  	return				; return to user
  045                   
  046                   ; Call DDT
  047                   
  048  SAIDFS  001 139  ddtcal:	skipn u,jobddt			; get start addr of DDT
  049  SAIDFS  001 102  	 jrst [	outstr [asciz/No DDT!
  050                   /]
  051  MACROS  003 059  		return]
  052  SAIDFS  001 331  	ptjobx [0 ? sixbit/DON/]	; turn echoing on
  053                   	hrroi t,[004000,,400\"N]	; [BREAK]N
  054          024 024  	skipn prtp			; not for printing console
  055  SAIDFS  001 294  	 ttyset t,			; back to page printer
  056  SAIDFS  001 055  	outstr [asciz/You're in DDT!
  057                   /]
  058  MACROS  003 058  	call (u)			; call DDT
  059  SAIDFS  001 331  	ptjobx [0 ? sixbit/DOFF/]	; turn echoing off
  060          024 020  	skipe ddp			; if a DD
  061          027 021  	 ddupg sclear			; zap the screen
  062          024 024  	skipe prtp			; not for printing console
  063                   	 jrst .+1			; 'cause they are losers
  064  SAIDFS  001 303  	ppact				; flush PP
  065          026 033  	store %fword,saupdp		; must fix whole screen
  066  SAIDFS  001 308  	leypos 2000			; throw away line editor
  067  MACROS  003 059  	return				; and return
␈↓&	Interrupt server                                                 SUPDUP.MID[NET,MRC] 11/06/77  Page 29␈↓'α
  001                   subttl Interrupt server
  002                   
  003  SAIDFS  001 149  intser:	skipn i,jobcni			; get reason for interrupt
  004          011 050  	 barf [asciz/Spurious interrupt!
  005                   /]
  006          023 031  	txze i,inttty			; got a character?
  007          024 032  	 store %fword,ttiinp		; yup, TTI on on on
  008          023 032  	txz i,intclk			; just ignore clock interrupts
  009          023 033  	txze i,intins			; IMP INS?
  010          024 033  	 sos ntoinp			; yes, flag net output interrupt
  011          023 035  	txze i,intinp			; IMP input?
  012          024 034  	 store %fword,ntiinp		; yup, flag IMP input
  013          023 036  	txze i,inttti			; [ESCAPE]I?
  014          024 035  	 store %fword,escpip		; yup, command time
  015          023 034  	txze i,intims			; IMP status change?
  016          029 024  	 jrst netser			; yes, hack net status change
  017                   	skipe i				; still more interrupt bits?
  018          011 050  luzint:	 barf [asciz/Unknown interrupt!
  019                   /]
  020  SAIDFS  001 237  	dismis				; yes, dismiss interrupt
  021                   
  022                   ; Network status interrupt.  Find out what happened and maybe die.
  023                   
  024          029 018  netser:	jumpn i,luzint			; losing interrupt?
  025  SAIDFS  001 150  	move u,jobtpc			; get PC at the interrupt
  026          024 054  	movem u,retnpc			; save it as return PC
  027          024 053  	store %fword,mskbts		; all masking bits
  028          024 053  	imskcl mskbts			; go off
  029  SAIDFS  001 245  	uwait				; finish up any UUO in progress
  030  SAIDFS  001 246  	debreak				; leave interrupt level
  031  MACROS  008 050  	movx u,2			; get status
  032  SAIDFS  001 067  	mtape net,u			; get network status
  033                   	ior v,w				; merge status bits together
  034          023 049  	txne v,clss\clsr		; connection closed?
  035          024 028  	 store %fword,clsedp		; flag that it's dying
  036          024 053  	intdej mskbts			; sigh, well, hurry on back
␈↓&	Startup, etc.                                                    SUPDUP.MID[NET,MRC] 11/06/77  Page 30␈↓'α
  001                   subttl Startup, etc.
  002                   
  003                   ;  Initialize the world; clear all I/O and other things; give
  004                   ; back any unneeded core to the monitor; clear data area, and
  005                   ; set up the stack pointer.
  006                   
  007                   supdup:	jfcl				; flush CCL crufties
  008  SAIDFS  001 183  	reset				; reset all I/O
  009          026 040  ifn ddtp,skipe debugp			; debugging?
  010          002 042  ifn dbugp,outstr [asciz/Paranoid /]
  011          002 042  ifn ddtp\dbugp,[
  012  SAIDFS  001 102  	 outstr [asciz/Debugging version!
  013                   /]
  014                   ];ddtp\dbugp
  015          029 003  	movei intser			; get addr of interrupt server
  016  SAIDFS  001 148  	movem jobapr			; tell monitor
  017  SAIDFS  001 145  	hlrz jobsa			; get size I should be
  018          002 043  ifn ddtp,[
  019          026 040  	skipn debugp			; debugging?
  020          065 048  	 movei sdpff			; no, then okay to flush DDT
  021  SAIDFS  001 145  	hrlm jobsa			; but make sure monitor knows now
  022                   ];ddtp
  023  SAIDFS  001 146  	movem jobff			; make sure monitor knows
  024  SAIDFS  001 192  	core				; in case I grew
  025          028 019  	 barf [asciz/CORE UUO failed!
  026                   /]					; goddam ungrateful monitor!
  027          002 043  ifn ddtp,[
  028          026 040  	skipe debugp			; debugging?
  029          030 036  	 jrst supdp1			; yes, can't flush DDT
  030  SAIDFS  001 139  	hrrz jobddt			; get addr of DDT
  031          065 048  	caige sdpff			; it is below pgm?
  032          030 036  	 jrst supdp1			; yes, didn't flush DDT
  033  MACROS  003 010  	movx x,%zeros			; no, flushed DDT, flush DDT's start addr
  034  SAIDFS  001 185  	setddt x,			; tell monitor (sigh)
  035                   ];ddtp
  036          026 036  supdp1:	store %zeros,corbeg,corend	; clear data area
  037  SAIDFS  001 146  	setzb @jobff			; clear first word of garbage
  038  SAIDFS  001 146  	adjsp @jobff			; make zapping pointer
  039                   	aos				; point to next word
  040  SAIDFS  001 137  	blt @jobrel			; now flush this trash
  041          024 049  	move p,[pdl(-pdllen)]		; load PDP
  042                   
  043                   ; (continued on next page)
␈↓&	Startup, etc.                                                    SUPDUP.MID[NET,MRC] 11/06/77  Page 31␈↓'α
  001                   ; Initial terminal setup
  002                   
  003                   ; Set up terminal codes for ITS and the sort of display we are
  004                   
  005          024 009  	store <<1-cnsbll>,,>,cnsblk	; Moon's new protocol
  006          024 010  	store %tnsfw,tctyp		; software TTY
  007          024 011  	store sdttop,ttyopt		; what we can support
  008          024 014  	store nlnglt,ttyrol		; scroll count
  009          024 012  	move [-2,,[6000,,tcmxh ? 15000,,tcmxv]]
  010  SAIDFS  001 294  	ttyset				; get screen size information
  011          024 012  	sos tcmxv ? sos tcmxv		; don't garble who-line
  012          024 013  	sos tcmxh ? sos tcmxh		; also allow for "!" on line overflow
  013                   
  014                   ;  Check terminal characteristics
  015                   
  016  MACROS  003 009  	movx x,%fword			; my console
  017  SAIDFS  001 105  	getlin x			; get my line characteristics
  018  MACROS  003 009  	caxn x,%fword			; detached?
  019  SAIDFS  001 193  	 exit				; yes, die die die
  020          023 025  	txne x,ptylin			; a PTY?
  021          024 022  	 store %fword,ptyp		; what a pity (I like puns)
  022          023 026  	txne x,impbit			; IMP PTY?
  023          024 023  	 store %fword,netp		; net hopper!
  024          023 021  	txne x,dislin			; III?
  025          024 021  	 store %fword,iiip		; yes
  026          023 022  	txne x,dmlin			; Datamedia?
  027          024 019  	 store %fword,dmp		; yes
  028          023 023  	txne x,dddlin			; Data Disc?
  029          024 020  	 store %fword,ddp		; yes
  030          023 022  	txne x,dislin\dddlin\dmlin	; is this a display we know about?
  031          031 039  	 jrst sdpdpy			; yup, it's a display
  032          024 024  	store %fword,prtp		; flag printing console
  033          024 010  	store %tnprt,tctyp		; printing console
  034          021 032  	store %tomvb\%toovr\%tolwr\%tomor\%toraw,ttyopt; with minimal options
  035          024 012  	store move,tcmxv		; ∞ page size
  036                   
  037                   ; Set terminal activate on all characters
  038                   
  039          023 027  sdpdpy:	txo x,spcbrk			; special activation mode bit
  040  SAIDFS  001 106  	setlin x			; enter SAM
  041  SAIDFS  001 112  	setact [[777777,,777777		; activate on 000 - 043
  042                   		 777777,,777777		;  044 - 107
  043                   		 777777,,777777		;  110 - 153
  044          023 017  		 777777,,600000\allact\bsact\supscm\supccr]]; 154 - 177, αβ act
  045  SAIDFS  001 331  	ptjobx [0 ? sixbit/DOFF/]	; turn echoing off
  046                   ;	jrst chfhnm			; now check for host name
␈↓&	Monitor command processor                                        SUPDUP.MID[NET,MRC] 11/06/77  Page 32␈↓'α
  001                   subttl Monitor command processor
  002                   
  003                   ;  Check for host name in the monitor command line.  Yes, I realize this
  004                   ; code is totally wierd!!!
  005                   
  006  SAIDFS  001 107  chfhnm:	rescan x			; get monitor command cruft back
  007          033 003  	jumpe x,gethst			; no cruft, ask for it
  008  SAIDFS  001 101  moncom:	inchrs x			; got a command, gobble a character
  009          033 003  	 jrst gethst			; lost, do it manually
  010                   	caxl x,"a			; lower case?
  011                   	 caxle x,"z			; . . .
  012                   	  caxa				; no
  013  MACROS  009 019  	   subx x,"a-"A			; yes, uppercaseify
  014          024 026  	skipn runcmp			; already checked for RUN command?
  015                   	 jrst [	caxe x,"R		; is it a RUN command?
  016          024 026  		 aosa runcmp		; nope
  017          024 026  		  store %fword,runcmp	; yes, no spaces checked!
  018                   		jrst .+1]		; now return
  019          024 026  	skipl runcmp			; called via RUN command?
  020                   	 caxe x,<" >			; space frob? (only if not RUN)
  021                   	  caxn x,<";>			; or comment?
  022                   	   caxa				; yup, hack it
  023          032 008  	    jrst moncom			; haven't gotten there yet, try again
  024  SAIDFS  001 101  	move b,[jsp y,[	inchrs x	; yes, load subroutine
  025          033 030  			 jrst badhst	; lost
  026                   			caxl x,"a	; lower case?
  027                   			 caxle x,"z	; . . .
  028                   			  caxa		; no
  029  MACROS  009 019  			   subx x,"a-"A	; yes
  030                   			caxn x,<" >	; found space?
  031                   			 jrst -1(y)	; yes, flush it
  032                   			jrst (y)]]	; end of subroutine
  033          033 012  	jrst scnhst			; and scan for this host
␈↓&	Get host name                                                    SUPDUP.MID[NET,MRC] 11/06/77  Page 33␈↓'α
  001                   subttl Get host name
  002                   
  003  SAIDFS  001 102  gethst:	outstr [asciz/Host = /]
  004  SAIDFS  001 099  	move b,[jsp y,[	inchrw x	; subroutine for non-monitor command
  005                   			caxl x,"a	; lower case?
  006                   			 caxle x,"z	; . . .
  007                   			  caxa		; no
  008  MACROS  009 019  			   subx x,"a-"A	; yes, uppercaseify
  009  SAIDFS  001 100  			outchr x	; echo the whatever
  010                   			jrst (y)]]	; end of non-monitor subroutine
  011          024 025  	store %fword,filinp		; remember to fill in host name
  012                   scnhst:	xct b				; get a character
  013                   	caxn x,"A			; AI Lab?
  014          024 025  	 jrst [	skipe filinp		; fill in host name?
  015  SAIDFS  001 102  		 outstr [asciz/I
  016                   /]
  017  MACROS  008 050  		movx a,sixbit/SD AI/	; select host name
  018  SAIDFS  001 216  		setnam a,		; and tell monitor
  019  MACROS  008 050  		movx a,206		; MIT-AI
  020          034 003  		jrst goicp]		; now ICP
  021                   	caxn x,"D			; Dynamod?
  022          024 025  	 jrst [	skipe filinp		; fill in host name?
  023  SAIDFS  001 102  		 outstr [asciz/M
  024                   /]
  025  MACROS  008 050  		movx a,sixbit/SD DM/	; select host name
  026  SAIDFS  001 216  		setnam a,		; and tell monitor
  027  MACROS  008 050  		movx a,106		; MIT-DMS
  028          034 003  		jrst goicp]		; now ICP
  029                   	caxe x,"M			; MathLab LCS place?
  030  SAIDFS  001 102  badhst:	 jrst [	outstr [asciz/?
  031                   /]
  032  SAIDFS  001 108  		clrbfi			; flush input buffer
  033          033 003  		jrst gethst]
  034                   	xct b				; get another character
  035                   	caxl x,"a			; lower case?
  036                   	 caxle x,"z			; . . .
  037                   	  caxa				; no
  038  MACROS  009 019  	   subx x,"a-"A			; uppercaseify
  039                   	caxn x,"C			; MACSYMA consortium?
  040  MACROS  008 050  	 jrst [	movx a,sixbit/SD MC/	; select host name
  041  SAIDFS  001 216  		setnam a,		; and tell monitor
  042  MACROS  008 050  		movx a,354		; MIT-MC
  043          024 025  		skipe filinp		; filling in?
  044  SAIDFS  001 102  		 outstr [asciz/
  045                   /]
  046          034 003  		jrst goicp]		; now ICP
  047                   	caxe x,"L			; Autoprog?
  048          033 030  	 jrst badhst			; nope, losey
  049  MACROS  008 050  	movx a,sixbit/SD ML/		; select host name
  050  SAIDFS  001 216  	setnam a,			; tell monitor
  051  MACROS  008 050  	movx a,306			; MIT-ML
  052          024 025  	skipe filinp			; filling in?
  053  SAIDFS  001 102  	 outstr [asciz/
  054                   /]
  055                   ;	jrst goicp			; now ICP
␈↓&	ICP ICP ICP                                                      SUPDUP.MID[NET,MRC] 11/06/77  Page 34␈↓'α
  001                   subttl ICP ICP ICP
  002                   
  003  SAIDFS  001 108  goicp:	clrbfi				; clear any crlf, etc.
  004  SAIDFS  001 102  	outstr [asciz/ Trying... /]
  005                   
  006                   ; Open channels and set timeouts
  007                   
  008  SAIDFS  001 049  	init icp,17			; open ICP in dump mode
  009                   		'IMP,,			; ARPAnet
  010                   		0			; no buffers
  011          028 019  	 barf [asciz/Can't OPEN the IMP!
  012                   /]
  013  SAIDFS  001 067  	mtape icp,[	17		; set timeouts
  014                   			.byte 6 ? 2 ? 24 ? 0 ? 7 ? 7 ? 0]
  015  SAIDFS  001 049  	init net,0			; open NET in ASCII mode
  016                   		'IMP,,			; ARPAnet
  017          024 041  		ntobf,,ntibf		; buffers
  018          028 019  	 barf [asciz/Can't OPEN the IMP!
  019                   /]
  020  SAIDFS  001 067  	mtape net,[	17		; set timeouts
  021                   			.byte 6 ? 2 ? 24 ? 0 ? 7 ? 0 ? 0]
  022                   
  023                   ;  Try to generate a unique socket number, using job number and
  024                   ; time of day to avoid lossage due to old connections.
  025                   ; Algorithm used is: job #,,<time&777770>
  026                   
  027  SAIDFS  001 206  	pjob x,				; get my job #
  028  SAIDFS  001 203  	mstime y,			; and the time now
  029                   	lsh x,18.			; put job # in LH
  030                   	hrri x,(y)			; and time in RH
  031  MACROS  010 059  	andx x,37777777770		; but zap low order bits
  032                   
  033                   ; Now try to get to the foreign place's server
  034                   
  035          025 009  insirp setzm,[impcod impsta impbyt]
  036          025 008  	store %fword,impwat		; do wait until timeout
  037          025 007  	movem x,implsk			; my socket to use
  038          025 023  	movem x,clsskt			; socket to close when done
  039          025 011  	movem a,imphst			; host to go to
  040          025 010  	store icpskt,impfsk		; socket to ICP on
  041          025 005  	mtape icp,impcod		; connect → foreign logger
  042          025 006  	move x,impsta			; get status
  043                   	txne x,77			; error code?
  044          063 035  	 jrst conerr			; yes, report MTAPE lossage
  045  SAIDFS  001 059  	getsts icp,y			; get error stats for message
  046          023 058  	txne y,ioimpm\ioderr\iodter\iobktl\iodend\hdead\ctrov\rset\tmo
  047          064 008  	 jrst iioerr			; so sorry
  048          023 047  	txc x,rfcs\rfcr			; for next instruction to win
  049          023 047  	txne x,rfcs\rfcr		; RFC sent+received?
  050          023 049  	 jrst [	txne x,clss\clsr	; close sent?
  051          063 005  		 jrst refuse		; yes, refused
  052          023 058  		movx y,tmo		; no, fake time out
  053          064 008  		jrst iioerr]		; and output error message
  054          025 010  	hrroi y,impfsk-1		; get ready to get a word
  055  MACROS  003 010  	movx z,%zeros			; stop after
  056                   
  057                   ; (continued on next page)
␈↓&	ICP ICP ICP                                                      SUPDUP.MID[NET,MRC] 11/06/77  Page 35␈↓'α
  001                   ; Get socket number from logger
  002                   
  003  SAIDFS  001 055  	in icp,y			; get socket from logger
  004                   	 caxa				; won
  005          063 015  	  jrst nosock			; didn't get socket number!
  006          025 010  	ldb x,[044000,,impfsk]		; get socket we got
  007          025 010  	movem x,impfsk			; and save it back
  008          025 021  	store 3,clscod			; close code
  009          025 021  	mtape icp,clscod		; close off ICP socket
  010  SAIDFS  001 066  	releas icp,			; free up channel
  011                   
  012                   ; Got socket number from logger; now connect output
  013                   
  014  MACROS  008 050  	movx x,3			; ICP/transmit offset
  015          025 007  	addb x,implsk			; local transmit socket
  016          025 017  	movem x,watskt			; save wait socket
  017          025 008  	store %zeros,impwat		; don't wait
  018          025 009  	store 8.,impbyt			; byte size
  019          025 005  	mtape net,impcod		; connect → server output
  020          025 006  	move x,impsta			; get status
  021                   	txne x,77			; only error code
  022          063 035  	 jrst conerr			; error?
  023                   
  024                   ; Now connect input
  025                   
  026          025 007  	sos implsk			; local receive socket
  027          025 010  	aos impfsk			; foreign transmit socket
  028          025 005  	mtape net,impcod		; connect ← server input
  029          025 006     	move x,impsta			; get status
  030                   	txne x,77			; only error code
  031          063 035  	 jrst conerr			; lose lose lose
  032                   
  033                   ; Connections started, now wait for output
  034                   
  035          025 015  	store 4,watcod			; WAIT code
  036          025 015  	mtape net,watcod		; wait for output
  037          025 016  	move x,watsta			; get status
  038                   	txne x,77			; only error code
  039          063 035  	 jrst conerr			; lose lose lose
  040  SAIDFS  001 059  	getsts net,y			; get error bits for message
  041          023 058  	txne y,ioimpm\ioderr\iodter\iobktl\iodend\hdead\ctrov\rset\tmo
  042          064 008  	 jrst iioerr			; too bad
  043          023 047  	txc x,rfcs\rfcr			; for next instruction to win
  044          023 047  	txne x,rfcs\rfcr		; RFC sent+received?
  045          023 049  	 jrst [	txne x,clss\clsr	; close sent?
  046          063 005  		 jrst refuse		; yes, refused
  047          023 058  		movx y,tmo		; no, fake a time out
  048          064 008  		jrst iioerr]		; and report it
  049                   
  050                   ; Output connected, now wait for input
  051                   
  052          025 017  	sos watskt			; now select receive socket
  053          025 015  	mtape net,watcod		; wait for input
  054          025 016  	move x,watsta			; get status
  055                   	txne x,77			; only error code
  056          063 035  	 jrst conerr			; error?
  057  SAIDFS  001 059  	getsts net,y			; get error bits for message
  058          023 058  	txne y,ioimpm\ioderr\iodter\iobktl\iodend\hdead\ctrov\rset\tmo
  059          064 008  	 jrst iioerr			; too bad
  060          023 047  	txc x,rfcs\rfcr			; for next instruction to win
  061          023 047  	txne x,rfcs\rfcr		; RFC sent+received?
  062          023 049  	 jrst [	txne x,clss\clsr	; close sent?
  063          063 005  		 jrst refuse		; yes, refused
  064          023 058  		movx y,tmo		; no, fake a time out
  065          064 008  		jrst iioerr]		; and continue
  066                   
  067  SAIDFS  001 052  	outstr [asciz/Open
  068                   /]
␈↓&	Final pre-display initialization                                 SUPDUP.MID[NET,MRC] 11/06/77  Page 36␈↓'α
  001                   subttl Final pre-display initialization
  002                   
  003                   ; Random other pre-execution initialization crufties
  004                   
  005  MACROS  008 050  	movx x,8.			; 8 bit bytes you know
  006          024 041  	dpb x,[300600,,ntibf+1]		; hack input buffer
  007          024 042          dpb x,[300600,,ntobf+1]		; and output buffer
  008          023 036  	movx x,inttty\intclk\intins\intims\intinp\inttti
  009  SAIDFS  001 238  	intenb x,			; enable interrupt conditions
  010          002 051  	clkint nsclin*60.		; get a clock interrupt every n secs
  011  SAIDFS  001 067  	mtape net,[15 ? 1]		; maximum allocation
  012                   
  013                   ; Send terminal characteristics
  014                   
  015          024 009  	move z,[440600,,cnsblk]		; load sixbit pointer to TTY chars
  016          024 015  	movx y,6*cnsbll			; load number of bytes to do
  017                   ttchsn:	ildb x,z			; get a character
  018          041 044  	call netoc1			; output it
  019          036 017  	sojg y,ttchsn			; loop until done
  020          041 033  	call netsnd			; now force it out
  021                   
  022                   ; Now get server's greeting message
  023                   
  024          046 005  grtmsg:	call netich			; get a character from the network
  025          022 013  	caxn x,%tdnop			; hit the no-op yet?
  026          036 032  	 jrst grtdun			; yes, greeting message done
  027  SAIDFS  001 100  	outchr x			; output it
  028          036 024  	jrst grtmsg			; and loop for next
  029                   
  030                   ; Make sure we can slurp up what is there now due to our hacking
  031                   
  032          024 034  grtdun:	store %fword,ntiinp		; will try to slurp slurp slurp now
␈↓&	Slurp up and send terminal ID                                    SUPDUP.MID[NET,MRC] 11/06/77  Page 37␈↓'α
  001                   subttl Slurp up and send terminal ID
  002                   
  003                   ; Tell SUPDUP server to expect terminal name
  004                   
  005  MACROS  008 050  	movx x,300			; escape to SUPSER
  006          041 044  	call netoc1			; send it
  007  MACROS  008 050  	movx x,302			; set TTY id
  008          041 044  	call netoc1			; send it
  009          024 023  	skipe netp			; is it a network user?
  010          024 019  	 jrst [	skipn dmp		; DM?
  011                   		 skipa y,[440700,,[asciz/Network terminal/]]
  012                   		  move y,[440700,,[asciz/Network Datamedia/]]
  013          065 016  		jrst sndid1]		; and send it
  014          024 022  	skipe ptyp			; is it a PTY?
  015                   	 jrst [	move y,[440700,,[asciz/Pseudo TTY/]]
  016          024 020  		skipe ddp		; for a DD?
  017                   		 move y,[440700,,[asciz/Data Disc PTY/]]
  018          024 021  		skipe iiip		; for a III?
  019                   		 move y,[440700,,[asciz/III PTY/]]
  020          024 019  		skipe dmp		; for a DM?
  021                   		 move y,[440700,,[asciz/DM PTY/]]
  022          065 016  		jrst sndid1]		; and send that
  023                   
  024                   ; Now try to get the file
  025                   
  026          024 043  	open dsk,[0 ? 'DSK,, ? dsibf]	; try to get a DDB
  027          028 019  	 barf [asciz/Can't OPEN the DSK!
  028                   /]
  029  MACROS  008 050  	movx x,sixbit/ROOMS/		; file name
  030                   	setzb y,z			; extension, date cruft
  031  MACROS  008 050  	movx a,sixbit/  PDOC/		; PPN
  032  SAIDFS  001 071  	lookup dsk,x			; try to find file
  033          017 019  	 jrst [	burp [asciz/ROOMS[P,DOC] is gone!
  034                   /]
  035          065 005  		jrst rndtid]		; lose
  036                   
  037                   ; Compute name we must look for
  038                   
  039  MACROS  008 050  	movx y,('TTY)			; console TTY name
  040  SAIDFS  001 281  	devnum y,			; get our TTY #
  041          065 005  	 jrst rndtid			; losey
  042                   	idivx y,100			; siphon off high order digit
  043                   	idivx z,10			; and two low order digits
  044                   ;	jrst search			; and search for it
␈↓&	Slurp up and send terminal ID                                    SUPDUP.MID[NET,MRC] 11/06/77  Page 38␈↓'α
  001                   ; Now search for terminal
  002                   
  003          065 023  search:	call getch			; get a character
  004  MACROS  003 054  	 jrst [	burp [asciz/ROOMS[P,DOC] in bad format!
  005                   /]
  006          065 005  		jrst rndtid]		; somebody better fix ROOMS[P,DOC] !!
  007                   	caxe x,"-			; got a - yet?
  008          038 003  	 jrst search			; not yet
  009          065 023  	call getch			; get a character for the number
  010  MACROS  003 054  	 jrst [	burp [asciz/ROOMS[P,DOC] in bad format!
  011                   /]
  012          065 005  		jrst rndtid]		; somebody better fix ROOMS[P,DOC] !!
  013          038 027  	jumpe y,[	jumpe z,serch2	; only one digit?
  014          038 021  			jrst serch1]	; no, two digits
  015                   	caie x,"0(y)			; win so far?
  016          038 029  	 jrst nxttty			; nope, we're still losing
  017          065 023  	call getch			; get next character
  018  MACROS  003 054  	 jrst [	burp [asciz/ROOMS[P,DOC] in bad format!
  019                   /]
  020          065 005  		jrst rndtid]		; somebody better fix ROOMS[P,DOC] !!
  021                   serch1:	caie x,"0(z)			; won?
  022          038 029  	 jrst nxttty			; nope
  023          065 023  	call getch			; almost there
  024  MACROS  003 054  	 jrst [	burp [asciz/ROOMS[P,DOC] in bad format!
  025                   /]
  026          065 005  		jrst rndtid]		; somebody better fix ROOMS[P,DOC] !!
  027                   serch2:	cain x,"0(a)			; got a match now?
  028          038 035  	 jrst fndrom			; yup, win win win
  029          065 023  nxttty:	call getch			; get a character
  030          038 003  	 jrst search			; okay, now search for a dash
  031          038 029  	jrst nxttty			; nope, continue flushing this line
  032                   
  033                   ; Found the terminal name, now send it along
  034                   
  035          065 023  fndrom:	call getch			; gobble down spaces
  036  MACROS  003 054  	 jrst [	burp [asciz/ROOMS[P,DOC] in bad format!
  037                   /]
  038          065 005  		jrst rndtid]		; somebody better fix ROOMS[P,DOC] !!
  039                   	caxn x,<" >			; leading space?
  040          038 035  	 jrst fndrom			; yes, flush it
  041          041 044  sndrom:	call netoc1			; send character out
  042          065 023  	call getch			; get a character
  043  MACROS  003 054  	 jrst [	burp [asciz/ROOMS[P,DOC] in bad format!
  044                   /]
  045          065 005  		jrst rndtid]		; somebody better fix ROOMS[P,DOC] !!
  046                   	caxe x,<" >			; saw a space?
  047          038 041  	 jrst sndrom			; nope, okay to send it
  048          041 044  	call netoc1			; well, can send one space
  049          065 023  flsspc:	call getch			; but not any more
  050          065 015  	 jrst rndrom			; all done
  051                   	caxn x,<" >			; a space to flush?
  052          038 049  	 jrst flsspc			; yes, flush it
  053          041 044  sndtid:	call netoc1			; not a space, send it
  054          065 023  	call getch			; get a character
  055                   	 caxa				; all done
  056          038 053  	  jrst sndtid			; no, send it out
  057                   
  058                   ; Done with sending room, finish that up and get going on real work
  059                   
  060  MACROS  003 010  sntrom:	movx x,%zeros			; final null
  061          041 044  	call netoc1			; send it
  062          041 033  tidone:	call netsnd			; force the buffer out
  063  SAIDFS  001 066  	release dsk,			; free up channel
␈↓&	Initialize screen                                                SUPDUP.MID[NET,MRC] 11/06/77  Page 39␈↓'α
  001                   subttl Initialize screen
  002                   
  003          024 024  	skipe prtp			; printing console?
  004          027 060  	 jrst [	store 5*dmbufl,dmcnt	; initialize counter
  005          027 058  		move [440700,,dmpgm]	; initialize pointer
  006          027 061  		movem dmpnt		; . . .
  007          039 038  		jrst loser]		; and flush display garbage
  008          026 012  	store %zeros,hpos		; to beginning of line
  009          026 011  	store %zeros,vpos		; top of screen
  010  SAIDFS  001 303  	ppact				; flush PP 0
  011  SAIDFS  001 308  	leypos 2000			; line editor off screen
  012          024 019  	skipe dmp			; is it a DM?
  013          027 060  	 jrst [	store 5*dmbufl,dmcnt	; initialize DM counter
  014          027 058  		move [440700,,dmpgm]	; initialize DM pointer
  015          027 061  		movem dmpnt		; . . .
  016          003 046  		dmcmd ↑←		; yes, clear the screen
  017          003 046  		dmcmd ↑L		; set cursor position
  018  MACROS  008 050  		movx x,140		; beginning of line
  019          056 005  		call dmchar		; output the character
  020  MACROS  008 050  		movx x,142		; line 2
  021          056 005  		call dmchar		; output the character
  022          056 048  		call dmout		; force it out
  023                   		jrst .+1]		; and continue
  024          024 021  	skipe iiip			; cretinous III?
  025          026 059  	 jrst [	store %zeros,scp	; all III frobs start with zero
  026          026 046  		move iiihdr		; get III header
  027          026 059  		movem scp+1		; set that
  028                   		jrst .+1]		; now continue
  029          024 020  	skipe ddp			; if a DD
  030          027 021  	 ddupg sclear			; zap screen
  031                   	hrroi x,[004000,,"W]		; restore wholine quickly
  032  SAIDFS  001 294  	ttyset x,			; by doing [ESCAPE]W
  033          048 005  	call scrini			; init core screen
  034          026 013  	store %fword,ovpos		; old vertical position
  035          024 019  	skipn dmp			; is this a DM?
  036          027 027  	 upgiot sdisp			; no, display the screen
  037          054 027  	call csrupd			; give a cursor
  038  SAIDFS  001 275  loser:	lock				; now get locked in core
  039          040 010  	jrst mainlp			; and enter main loop
␈↓&	Main program loop, clock interrupt                               SUPDUP.MID[NET,MRC] 11/06/77  Page 40␈↓'α
  001                   subttl Main program loop, clock interrupt
  002                   
  003                   ; Main program loop
  004                   
  005          054 003  zzzzzz:	call scnupd			; update screen if necessary
  006  SAIDFS  001 249  	iwait				; bye bye
  007                   
  008                   ; Something woke us up.  Find out what
  009                   
  010          054 003  mainlp:	call scnupd			; update screen if necessary
  011          024 035  	aosg escpip			; [ESCAPE]I typed?
  012          057 003  	 jrst cmdcmd			; yes, process command
  013          024 032  	aosg ttiinp			; TTY input available?
  014          041 003  	 jrst ttiser			; yes, slurp slurp
  015          024 034  	aosg ntiinp			; network input available?
  016          044 006  	 jrst ntiser			; yes, get network input
  017                   
  018                   ;  On a clock interrupt we just check the input frobbies to
  019                   ; make sure we didn't lose an int somehow
  020                   
  021  SAIDFS  001 110  	inskip				; got a character?
  022                   	 caxa				; nope
  023          041 005  	  jrst ttisr1			; yes, do it do it do it
  024  SAIDFS  001 067  	mtape net,[10]			; network input?
  025          040 005  	 jrst zzzzzz			; nope
  026          024 034  	setzm ntiinp			; yes, clear flag if was on
  027          044 006  	jrst ntiser			; now hack net input
␈↓&	TTY input service                                                SUPDUP.MID[NET,MRC] 11/06/77  Page 41␈↓'α
  001                   subttl TTY input service
  002                   
  003  SAIDFS  001 110  ttiser:	inskip				; got a character?
  004          040 010  	 jrst mainlp			; nope, back to main loop
  005  SAIDFS  001 099  ttisr1:	inchrw x			; get a character
  006          024 024  	skipe prtp			; printing console?
  007                   	 jrst [	move y,x		; dumb ALLOMP
  008          043 058  		call allomp		; map to ASCII
  009                   		move x,y		; get character back
  010                   		caxn x,↑E		; yes, check marginal ↑E feature
  011  MACROS  003 009  		 jrst [	store %fword,ctlfyp; yes, controllify next character
  012          041 003  			jrst ttiser]	; and continue
  013                   		caxn x,↑↑		; and even more marginal ↑↑ feature
  014  MACROS  003 009  		 jrst [	store %fword,escpip; yes, pretend [ESCAPE]I
  015          041 003  			jrst ttiser]	; and continue
  016          021 067  		caxn x,%txctl\%txmta\↑J	; αβ[LF]?
  017  MACROS  008 050  		 movx x,↑Z		; yes, convert to ↑Z
  018          024 037  		aosn ctlfyp		; must controllify?
  019  MACROS  010 028  		 txz x,140		; yes, controllify the TTY way
  020                   		jrst .+1]		; and continue
  021                   	ldb y,[000700,,x]		; get ASCII part of X
  022                   	caxn y,↑M			; terpri?
  023  SAIDFS  001 099  	 inchrw y			; gobble line feed
  024          042 003  	call netoch			; send it out
  025  SAIDFS  001 110  	inskip				; any more?
  026                   	 caxa				; no, force buffer out
  027          041 005  	  jrst ttisr1			; else hack the extra characters
  028          041 033  	call netsnd			; send the buffer out
  029          041 003  	jrst ttiser			; and try for any frobs just came in
  030                   
  031                   ; Force the buffer out to the network
  032                   
  033          024 042  netsnd:	ldb x,[410300,,ntobf+1]		; load position field
  034  MACROS  008 050  	movx y,1			; get a bit to hack
  035                   	lsh y,(x)			; 2↑# of characters
  036  MACROS  009 019  	subx y,1			; now get null bit flusher mask
  037          024 042  	iorm y,@ntobf+1			; make sure the nulls aren't sent
  038  SAIDFS  001 056  	out net,			; send the character
  039  MACROS  003 059  	 return				; won
  040          064 005  	jrst nioerr			; lost
  041                   
  042                   ; Auxillary NETOCH
  043                   
  044          024 042  netoc1:	sosg ntobf+2			; space available in buffer?
  045  SAIDFS  001 056  	 out net,			; no, output the buffer
  046                   	  caxa				; win
  047          064 005  	   jrst nioerr			; lose
  048          024 042  	idpb x,ntobf+1			; put character in buffer
  049  MACROS  003 059  	return				; and return
␈↓&	TTY input service                                                SUPDUP.MID[NET,MRC] 11/06/77  Page 42␈↓'α
  001                   ; Output a character to the network buffer in the hairy way
  002                   
  003          024 024  netoch:	skipe prtp			; printing console?
  004          041 044  	 jrst netoc1			; yes, no hair allowed
  005          024 042  	sosg ntobf+2			; space available in buffer?
  006  SAIDFS  001 056  	 out net,			; no, output the buffer
  007                   	  caxa				; win
  008          064 005  	   jrst nioerr			; lost
  009          024 036  	aosn imgchp			; image characters?
  010          043 017  	 jrst ntoc2a			; yes, don't map then
  011                   
  012                   ;  Map αZ to [CALL], αβZ to α[CALL], α_ to [BACK NEXT], αβ_ to α[BACK NEXT].
  013                   ; αz and αβz will behave in a similar manner.
  014                   ;  These mappings are necessary since there is no way that SUPDUP can read a
  015                   ; [CALL] coming in for the Stanford keyboard, and there is no [BACK NEXT] key
  016                   ; on them.  For various other obscure characters, commands exist to send them.
  017                   
  018                   	ldb y,[001000,,x]		; get αcharacter
  019          021 066  	caxe y,%txctl\"z		; some form of αz?
  020          021 066  	 caxn y,%txctl\"Z		; or of αZ?
  021  MACROS  008 050  	  jrst [movx y,↑Z		; yes, convert to [CALL]
  022                   		dpb y,[001000,,x]	; save character
  023          021 067  		txze x,%txmta		; αβz or αβZ?
  024          021 066  		 iorx x,%txctl		; yes, make it α[CALL]
  025          043 026  		jrst netoc3]		; now send this bucky command
  026          021 066  	caxn y,%txctl\"_		; α_?
  027  MACROS  008 050  	 jrst [	movx y,↑←		; yes, convert to [BACK NEXT]
  028                   		dpb y,[001000,,x]	; save character
  029          021 067  		txze x,%txmta		; αβ_?
  030          021 066  		 iorx x,%txctl		; yes, make it α[BACK NEXT]
  031          043 026  		jrst netoc3]		; now go send the frob
  032                   ;	jrst netoc2			; else fall through
␈↓&	TTY input service                                                SUPDUP.MID[NET,MRC] 11/06/77  Page 43␈↓'α
  001                   ; More output mapping stuff
  002                   
  003                   ;  Map the character from the SAIL to the ITS character set and check for
  004                   ; if TOPififcation is needed (TECO will treat SAIL graphics as controls
  005                   ; unless %TXTOP is on).  Then check for any bucky bits, and if any, then
  006                   ; do it the hairy way.
  007                   
  008                   netoc2:	ldb y,[000700,,x]		; get ASCII part of character
  009          043 052  	call outmap			; map to ITS ASCII
  010                   	dpb y,[000700,,x]		; and kludge back
  011                   	caxl y,↑J			; LF is not TOPified
  012                   	 caxle y,↑M			; neither are VT, FORM, and CR
  013                   	  caxn y,<↑[>			;]neither is ALT
  014          043 017  	   jrst ntoc2a			; nope, it's a positioning(?) frob
  015                   	caxge y,<" >			; all SAIL graphics
  016          021 070  	 iorx x,%txtop			; are TOPified (happy TECO)
  017          021 067  ntoc2a:	txnn x,%txtop\%txsfl\%txsft\%txmta\%txctl; any bucky bits?
  018          024 042  	 jrst [	idpb x,ntobf+1		; nope, just send the frob
  019                   		caxn x,"≤		; sending the escape code?
  020          041 044  		 call netoc1		; yes, repeat it
  021  MACROS  003 059  		return]			; now return
  022                   
  023                   ;  The character has bucky bits, so the intelligent terminal protocol is used to
  024                   ; send bucky bits: [↑\] [<bucky bits>←-7] [<character>].
  025                   
  026  MACROS  008 050  netoc3:	movx y,↑\			; load escape code
  027          024 042  	idpb y,ntobf+1			; put character in buffer
  028  MACROS  008 050  	movx y,"@			; initialize bucky word
  029          021 070  	txze x,%txtop			; [TOP] set?
  030          021 070  	 txo y,%txtop←-7		; yes, use it then
  031                   ;
  032                   ;  Nobody in their right mind would write a program on ITS that uses %txsfl and
  033                   ; %txsft, so it's not worth the runtime to implement.
  034                   ;
  035                   ;	txze x,%txsfl			; [SHIFT LOCK]?
  036                   ;	 txo y,%txsfl←-7		; uselessness
  037                   ;	txze x,%txsft			; [SHIFT]?
  038                   ;	 txo y,%txsft←-7		; more uselessness
  039          021 067  	txze x,%txmta			; β character?
  040          021 067  	 txo y,%txmta←-7		; yup
  041          021 066  	txze x,%txctl			; α character?
  042          021 066  	 txo y,%txctl←-7		; yup
  043                   	exch x,y			; swap swap swap
  044          041 044  	call netoc1			; send this cruftie out
  045                   	exch x,y			; swap back
  046          041 044  	call netoc1			; now send the non-bucky character
  047  MACROS  003 059  	return				; and return
  048                   
  049                   ;  Output mapping from SAIL to ITS character set.  The idea is that the Stanford
  050                   ; keyboard appears as a strange type of Knight keyboard.
  051                   
  052          003 030  outmap:	mapit y,137,030			; backarrow
  053          003 030  	mapit y,030,137			; underscore
  054          003 030  	mapit y,033,032			; not equals
  055                   
  056                   ; Common mappings for everything
  057                   
  058          003 030  allomp:	mapit y,032,176			; tilde
  059          003 030  	mapit y,175,033			; diamond
  060          003 030  	mapit y,176,175			; right curly bracket
  061  MACROS  003 059  	return				; else return
␈↓&	Network input service                                            SUPDUP.MID[NET,MRC] 11/06/77  Page 44␈↓'α
  001                   subttl Network input service
  002                   
  003                   ;  Read a character but don't hang.  This is more straightforward than the
  004                   ; old NTISER, and fixes the centered-dot bug for good now!
  005                   
  006          024 041  ntiser:	sosg ntibf+2			; anything in buffer?
  007  SAIDFS  001 067  	 jrst [	mtape net,[10]		; any input available?
  008          040 010  		 jrst mainlp		; no, return
  009  SAIDFS  001 055  		in net,			; yes, get a new buffer
  010                   		 jrst .+1		; won (fix the infamous centered dot bug)
  011          064 005  		jrst nioerr]		; lost
  012          046 037  	call nulfls			; flush nulls
  013          024 041  	ldb x,ntibf+1			; get a byte
  014          024 024  	skipe prtp			; printing console?
  015          044 006  	 jrst [	jumpe x,ntiser		; flush nulls
  016                   		caxl x,177		; and non ASCII
  017          044 006  		 jrst ntiser		; gets flushed too
  018          027 060  		sosg dmcnt		; any room in buffer?
  019          055 041  		 call prtout		; no, output the buffer
  020          046 030  		call allimp		; map output
  021          027 061  		idpb x,dmpnt		; save character
  022          044 006  		jrst ntiser]		; and continue
  023          024 033  	skipge ntoinp			; still hacking output reset?
  024          022 017  	 caxn x,%tdors			; got an output reset?
  025                   	  caxn x,377			; padding null?
  026          044 006  	   jrst ntiser			; sigh
  027                   
  028                   ; Check for any display stuff that must be done
  029                   
  030          026 017  	aosn govpos			; get old vertical position?
  031          026 018  	 jrst [	store %fword,gohpos	; yes, now get old horizontal position
  032          044 006  		jrst ntiser]		; and try for next
  033          026 018  	aosn gohpos			; get old horizontal position?
  034          026 019  	 jrst [	store %fword,gtvpos	; yes, get vertical position now
  035          044 006  		jrst ntiser]		; and try for next
  036          026 019  	aosn gtvpos			; get vertical position?
  037          026 020  	 jrst [	store %fword,gthpos	; yes, get horizontal position now
  038          026 011  		movem x,vpos		; save current vpos now
  039          026 034  		store %fword,crupdp	; flag cursor updated
  040          044 006  		jrst ntiser]		; and try for next
  041          026 020  	aosn gthpos			; get horizontal position?
  042          026 012  	 jrst [	movem x,hpos		; set horizontal position
  043          026 034  		store %fword,crupdp	; flag cursor updated
  044          024 019  		skipn dmp		; is this a DM?
  045          044 006  		 jrst ntiser		; no, return
  046          003 046  		dmcmd ↑L		; send a cursor position
  047          026 012  		move x,hpos		; x position
  048  MACROS  010 064  		xorx x,140		; DM crock
  049          056 005  		call dmchar		; output the character
  050          026 011  		move x,vpos		; y position
  051  MACROS  009 011  		addx x,2		; give who-line room
  052  MACROS  010 064  		xorx x,140		; DM crock
  053          056 005  		call dmchar		; output the character
  054          044 006  		jrst ntiser]		; and continue
  055                   
  056                   ; (continued on next page)
␈↓&	Network input service                                            SUPDUP.MID[NET,MRC] 11/06/77  Page 45␈↓'α
  001                   ; Check for other display stuff
  002                   
  003          026 024  	aosn gtiln			; insert lines?
  004          051 005  	 jrst inslin			; yup
  005          026 025  	aosn gtdln			; delete lines?
  006          051 033  	 jrst dellin			; yup
  007          026 026  	aosn gtich			; insert characters?
  008          052 003  	 jrst inschr			; yup
  009          026 027  	aosn gtdch			; delete characters?
  010          053 003  	 jrst delchr			; yup
  011          022 005  	caxl x,%tdmov			; display code?
  012          047 003  	 jrst dpyser			; yes, go do special things
  013                   
  014                   ; Check for garbage received and flush it
  015                   
  016          028 018  	jumpe x,[	burp [asciz/Cannot display centered-dot!
  017                   /]
  018          044 006  			jrst ntiser]	; I think NULs can't happen anymore
  019                   	caxn x,↑I			; tab?
  020          028 018  	 jrst [	burp [asciz/Cannot display gamma!
  021                   /]
  022          044 006  		jrst ntiser]		; this shouldn't happen
  023                   	caxn x,↑J			; image LF?
  024          028 018  	 jrst [	burp [asciz/Cannot display delta!
  025                   /]
  026          044 006  		jrst ntiser]		; should not happen
  027                   	caxn x,↑M			; image CR?
  028          028 018  	 jrst [	burp [asciz/Cannot display circle-plus!
  029                   /]
  030          044 006  		jrst ntiser]		; should not happen
  031                   
  032                   ; Good character, so display it
  033                   
  034          046 020  	call inpmap			; map from ITS to SAIL ASCII
  035          048 023  	call scstor			; store it on the screen
  036          044 006  	jrst ntiser			; continue until this frob empty
␈↓&	Network input service                                            SUPDUP.MID[NET,MRC] 11/06/77  Page 46␈↓'α
  001                   ; Subroutines for network input service
  002                   
  003                   ; Read a character from the network, hanging for it
  004                   
  005          024 041  netich:	sosg ntibf+2			; anything in buffer?
  006  SAIDFS  001 055  	 in net,			; nope, get some
  007                   	  caxa				; won
  008          064 005  	   jrst nioerr			; lost
  009          046 037  	call nulfls			; call null flusher crock
  010          024 041  	ldb x,ntibf+1			; get a byte
  011                   	caxn x,377			; padding null?
  012          046 005  	 jrst netich			; yup
  013          024 024  	skipe prtp			; printing console?
  014          046 030  	 jrst allimp			; yes, only map printing characters
  015                   ;	jrst inpmap			; map from ITS to SAIL ASCII
  016                   
  017                   ;  Map graphics from ITS extended ASCII to SAIL's extended ASCII.
  018                   ; First come mappings necessary between SAIL and ITS ASCII
  019                   
  020          003 030  inpmap:	mapit x,013,136			; uparrow
  021          003 030  	mapit x,030,137			; left arrow
  022          003 030  	mapit x,032,033			; not equals
  023          003 030  	mapit x,033,175			; diamond
  024          003 030  	mapit x,136,004			; caret (sigh!!!)
  025          003 030  	mapit x,137,030			; underscore
  026          003 030  	mapit x,177,013			; integral sign
  027                   
  028                   ; Then come mappings which are done going anywhere.
  029                   
  030          003 030  allimp:	mapit x,175,176			; right curly brace
  031          003 030  	mapit x,176,032			; tilde
  032  MACROS  003 059  	return				; and return
  033                   
  034                   ;  Flush nulls and bump byte pointer.  Assumes that no data bytes follow
  035                   ; padding bytes in a word.
  036                   
  037          024 041  nulfls:	ibp ntibf+1			; point to byte we're going to hack
  038          024 041  	move x,@ntibf+1			; get word of that byte
  039  MACROS  010 059  	andx x,17			; only marking bits
  040                   	jffo x,.+2			; count leading zeros
  041  MACROS  003 059  	 return				; no nulls to flush
  042          024 041  	andcam x,@ntibf+1		; turn off padding bits
  043                   	move y,-32.(y)+[.byte 8 ? 377 ? 377 ? 377 ? 377
  044                   			.byte 8 ? 000 ? 377 ? 377 ? 377
  045                   			.byte 8 ? 000 ? 000 ? 377 ? 377
  046                   			.byte 8 ? 000 ? 000 ? 000 ? 377]
  047          024 041  	tdne y,@ntibf+1			; are they really nulls?
  048          028 018  	 burp [asciz/Non-nulls in padding bytes!
  049                   /]
  050          024 041  	iorm y,@ntibf+1			; hack out trailing nulls
  051  MACROS  003 059  	return				; normal return
␈↓&	Display hacking                                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 47␈↓'α
  001                   subttl Display hacking
  002                   
  003          022 030  dpyser:	caxl x,%tdmax			; a baddie?
  004  MACROS  009 004  	 jrst [	outstr [asciz/Spurious input %TD code (/]
  005                   		idivx x,100		; get hundreds
  006                   		idivx y,10		; and tens and ones
  007                   		repeat 3,[
  008  MACROS  009 011  		 addx x+.rpcnt,"0	; ASCIIify
  009  SAIDFS  001 100  		 outchr x+.rpcnt	; and print it
  010                   		]			; once for each digit
  011          028 018  		burp [asciz/) flushed.
  012                   /]
  013          044 006  		jrst ntiser]		; yes, report it
  014          047 027  	xct dpyctb-%tdmov(x)		; no, dispatch on it
  015          044 006  	jrst ntiser			; return
  016                   
  017                   ;  Dispatch table for ITS cursor control codes.  The server for
  018                   ; a display code is defined by:
  019                   ;	DPYSVR code,server instruction
  020                   ; The servers must be in order by their codes!
  021                   
  022                   define dpysvr code,server
  023          017 019   ifn .-dpyctb-code+%tdmov,.err code is out of order
  024                    server
  025                   termin
  026                   
  027          026 017  dpyctb:	dpysvr %tdmov,[store %fword,govpos]
  028          026 019  	dpysvr %tdmv1,[store %fword,gtvpos]
  029          050 033  	dpysvr %tdeof,[call clreof]
  030          049 005  	dpysvr %tdeol,[call clreol]
  031          049 029  	dpysvr %tddlf,[call clr1ch]
  032          022 010  	dpysvr %tdmtf,[burp [asciz/Spurious input %TDMTF flushed.
  033                   /]]
  034          022 011  	dpysvr %tdmtn,[burp [asciz/Spurious input %TDMTN flushed.
  035                   /]]
  036          049 046  	dpysvr %tdcrl,[call terpri]
  037          022 013  	dpysvr %tdnop,[jfcl]
  038          022 014  	dpysvr %tdbs,[burp [asciz/Spurious input %TDBS flushed.
  039                   /]]
  040          022 015  	dpysvr %tdlf,[burp [asciz/Spurious input %TDLF flushed.
  041                   /]]
  042          022 016  	dpysvr %tdrcr,[burp [asciz/Spurious input %TDRCR flushed.
  043                   /]]
  044          050 011  	dpysvr %tdors,[call oreset]
  045          022 018  	dpysvr %tdqot,[burp [asciz/Spurious input %TDQOT flushed.
  046                   /]]
  047          050 024  	dpysvr %tdfs,[call csraos]
  048          026 019  	dpysvr %tdmv0,[store %fword,gtvpos]
  049          048 041  	dpysvr %tdclr,[call clrscn]
  050          050 005  	dpysvr %tdbel,[call bredle]
  051          022 023  	dpysvr %tdini,[burp [asciz/Spurious input %TDINI flushed.
  052                   /]]
  053          026 024  	dpysvr %tdilp,[store %fword,gtiln]
  054          026 025  	dpysvr %tddlp,[store %fword,gtdln]
  055          026 026  	dpysvr %tdicp,[store %fword,gtich]
  056          026 027  	dpysvr %tddcp,[store %fword,gtdch]
  057          022 028  	dpysvr %tdbow,[burp [asciz/Spurious input %TDBOW flushed.
  058                   /]]
  059          022 029  	dpysvr %tdrst,[burp [asciz/Spurious input %TDRST flushed.
  060                   /]]
  061          017 019  ifn .-dpyctb-%tdmax+%tdmov,.err %TDMAX is wrong
␈↓&	Display subroutines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 48␈↓'α
  001                   subttl Display subroutines
  002                   
  003                   ; Here to initialize the screen image in core
  004                   
  005          026 061  scrini:	store ascii/     /+1,screen,scrend; write blanks throughout screen
  006  MACROS  008 050  	movx x,<ascii/
  007                   /+1>					; DD type of terpri
  008  MACROS  003 010  	movx y,%zeros			; top line
  009  MACROS  008 050  	movx z,1			; blank word
  010          002 048  	movx a,nlines			; do for number of lines on screen
  011          026 061  scrin1:	movem z,screen(y)		; zap first word on line
  012          026 061  	movem z,screen+1(y)		; and second one too
  013          026 061  	movem x,screen+nwrdln-2(y)	; put terpri at end
  014          026 061  	movem z,screen+nwrdln-1(y)	; and nothingness after that
  015          026 005  	addx y,nwrdln			; go to next line
  016          026 031  	store %zeros,slupdp-1(a)	; line not updated
  017          048 011  	sojg a,scrin1			; loop for next line
  018          027 005  glnini:	store 2,scc+2,scc+2+ngw-1	; blank graphics word
  019  MACROS  003 059  	return				; now return
  020                   
  021                   ; Here to store a character on the screen
  022                   
  023          026 011  scstor:	move y,vpos			; line position
  024          026 031  	store %fword,slupdp(y)		; flag this line changed
  025          026 032  	store %fword,scupdp		; and that there is a change
  026          026 005  	imulx y,nwrdln			; number words/line
  027          026 012  	move z,hpos			; x position
  028          024 013  	caml z,tcmxh			; greater than line length
  029          026 012  	 jrst [	aos hpos		; account for it anyway
  030  MACROS  003 059  		return]			; and flush the attempt
  031                   	idivx z,5			; word position
  032          026 061  	addi y,screen+2(z)		; address of word to hack
  033          027 047  	dpb x,scbytp(z+1)		; save character on screen
  034          026 012  	aos hpos			; bump X position
  035          024 019  	skipe dmp			; is this a DM?
  036          056 005  	 jrst dmchar			; yes, output this character
  037  MACROS  003 059  	return				; and return
  038                   
  039                   ; Here to clear the screen
  040                   
  041          026 011  clrscn:	store %zeros,vpos		; top line
  042          026 012  	store %zeros,hpos		; leftmost column
  043          048 005  	call scrini			; initialize screen
  044          026 033  	store %fword,saupdp		; updated entire screen
  045          054 003  	call scnupd			; now update the screen
  046          024 019  	skipn dmp			; is this a DM?
  047  MACROS  003 059  	 return				; no, return
  048          003 046  	dmcmd ↑←			; clear the screen
  049          003 046  	dmcmd ↑L			; set cursor position
  050  MACROS  008 050  	movx x,140			; beginning of line
  051          056 005  	call dmchar			; output the character
  052  MACROS  008 050  	movx x,142			; line 2
  053          056 005  	call dmchar			; output it
  054          056 048  	jrst dmout			; force it all out
␈↓&	Display subroutines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 49␈↓'α
  001                   ; Non-insert/delete display subroutines
  002                   
  003                   ; Here to clear to EOL
  004                   
  005          024 019  clreol:	skipe dmp			; is this a DM?
  006          003 046  	 jrst [	dmcmd ↑W		; yes, send line zapper
  007                   		jrst .+1]		; and return
  008          026 012  	move b,hpos			; get the position now
  009          002 049  	caxl b,linel			; if done
  010  MACROS  003 059  	 return				; flush
  011          026 011  	move y,vpos			; get vertical position
  012          026 031  	store %fword,slupdp(y)		; flag this line changed
  013          026 032  	store %fword,scupdp		; and that there is a change
  014          026 005  	imulx y,nwrdln			; number of words/line
  015          026 012  	move z,hpos			; save horizontal position
  016                   	idivx z,5			; word position
  017          026 061  	addi y,screen+2(z)		; address of word to hack
  018          027 047  	move z,scbytp(z+1)		; get byte pointer
  019  MACROS  008 050  	movx x,<" >			; space in the character
  020                   	dpb x,z				; zap this character
  021  MACROS  009 011  cleol1:	addx b,1			; bump character pointer
  022          002 049  	caxl b,linel			; got to EOL yet?
  023  MACROS  003 059  	 return				; and return
  024                   	idpb x,z			; zap another character
  025          049 021  	jrst cleol1			; nope, not done yet
  026                   
  027                   ; Here to delete a character forward
  028                   
  029          024 019  clr1ch:	skipe dmp			; is this a DM?
  030          003 046  	 jrst [	dmcmd <" >		; yes, zap out the character
  031          003 046  		dmcmd ↑H		; back up
  032                   		jrst .+1]		; and continue
  033  MACROS  008 050  	movx x,<" >			; a blank space
  034          026 011  	move y,vpos			; line position
  035          026 031  	store %fword,slupdp(y)		; flag this line changed
  036          026 032  	store %fword,scupdp		; and that a change happened
  037          026 005  	imulx y,nwrdln			; number of words/line
  038          026 012  	move z,hpos			; horizonal position
  039                   	idivx z,5			; word position
  040          026 061  	addi y,screen+2(z)		; address to be hacked
  041          027 047  	dpb x,scbytp(z+1)		; shove character in
  042  MACROS  003 059  	return				; and return
  043                   
  044                   ; Here to terpri
  045                   
  046          024 019  terpri:	skipe dmp			; is this a DM?
  047          003 046  	 jrst [	dmcmd ↑M		; yes, do a CR
  048                   		jrst .+1]		; and continue
  049          026 012  	store %zeros,hpos		; to beginning of line
  050          026 011  	aos y,vpos			; bump vertical position
  051          024 012  	caml y,tcmxv			; gone too far?
  052          026 061  	 jrst [	move y,[screen+nwrdln,,screen]; foo!  gotta scroll (sigh)
  053          026 061  		blt y,screen+scrsiz-nwrdln-1; the big BLT strikes again
  054          002 055  		store ascii/     /+1,botlin+1,botlin+<nchars/5>
  055          026 033  		store %fword,saupdp	; I can't believe I updated the WHOLE thing
  056          024 012  		move tcmxv ? sos ? movem vpos; set vertical position to bottom line
  057                   		jrst .+1]		; and continue
  058          026 034  	store %fword,crupdp		; flag cursor has moved
  059          049 005  	jrst clreol			; and now clear the line
␈↓&	Display subroutines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 50␈↓'α
  001                   ; More display subroutines
  002                   
  003                   ; Here to breedle
  004                   
  005  MACROS  003 009  bredle:	movx x,%fword			; → own speaker
  006  SAIDFS  001 286  	beep x,				; breedle...
  007  MACROS  003 059  	return				; and return
  008                   
  009                   ; Here to respond to an output reset
  010                   
  011  MACROS  008 050  oreset:	movx x,↑\			; escape code
  012          041 044  	call netoc1			; send it
  013  MACROS  008 050  	movx x,↑P			; ready to send cursor position
  014          041 044  	call netoc1			; here it comes...
  015          026 011  	move x,vpos			; vertical position
  016          041 044  	call netoc1			; . . .
  017          026 012  	move x,hpos			; horizontal position
  018          041 044  	call netoc1			; . . .
  019          024 033  	aos ntoinp			; flush one net interrupt
  020          041 033  	jrst netsnd			; force these crufies out
  021                   
  022                   ; Here to forespace
  023                   
  024          024 019  csraos:	skipe dmp			; is this a DM?
  025          003 046  	 jrst [	dmcmd ↑\		; yes, space forward
  026                   		jrst .+1]		; and continue
  027          026 012  	aos hpos			; bump horizontal position
  028          026 034  	store %fword,crupdp		; flag cursor updated
  029  MACROS  003 059  	return				; and return
  030                   
  031                   ; Here to clear to EOF
  032                   
  033          026 012  clreof:	save hpos			; save current horizontal pos
  034          026 011  	save vpos			; ditto for vertical
  035          049 005  cleof1:	call clreol			; clear to end of line
  036          026 012  	store %zeros,hpos		; now clear all of the lines below
  037          026 011  	aos x,vpos			; bump to new line
  038          002 048  	caxge x,nlines			; all done yet?
  039          050 035  	 jrst cleof1			; nope, kill next line
  040          026 011  	retr vpos			; get back old vertical position
  041          026 012  	retr hpos			; and horizontal position
  042  MACROS  003 059  	return				; and return
␈↓&	Display subroutines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 51␈↓'α
  001                   ; Line insert/delete
  002                   
  003                   ; Here to insert a line
  004                   
  005          024 019  inslin:	skipe dmp			; is this a DM?
  006          003 046  	 jrst [	dmcmd ↑P		; yes, enter i/d mode
  007          003 046  		dmcmd ↑J		; insert a line
  008          003 046  		dmcmd ↑X		; leave i/d mode
  009                   		jrst .+1]		; and continue
  010                   	move a,x			; copy # of lines to hack
  011          026 011  insln0:	move x,vpos			; load vertical position
  012          026 005  	imulx x,nwrdln			; make into word counter
  013          026 061  	addi x,screen			; address of first word of cursor line
  014          026 061  	cain x,screen+<nlines-1>*nwrdln	; skip unless at bottom line
  015          051 022  	 jrst insln2			; on bottom, zap it
  016          026 061  	move y,[screen+<nlines-2>*nwrdln,,screen+<nlines-1>*nwrdln]
  017                   insln1:	move z,y			; copy pointer
  018          026 005  	blt z,nwrdln-1(y)		; copy one line
  019          026 005  	adjsp y,-nwrdln			; offset a line
  020                   	caie x,(y)			; done yet?
  021          051 017  	 jrst insln1			; nope
  022  MACROS  008 037  insln2:	store ascii/     /+1,2(x)	; blanks
  023          026 005  	movei y,nwrdln-2-1(x)		; number to do
  024  MACROS  009 011  	addx x,3			; address offset
  025                   	hrli x,-1(x)			; complete pointer
  026                   	blt x,(y)			; zak!
  027          051 011  	sojg a,insln0			; loop for more lines
  028          026 033  	store %fword,saupdp		; updated the world
  029          044 006  	jrst ntiser			; and return
  030                   
  031                   ; Here to delete a line
  032                   
  033          024 019  dellin:	skipe dmp			; is this a DM?
  034          003 046  	 jrst [	dmcmd ↑P		; yes, enter i/d mode
  035          003 046  		dmcmd ↑Z		; delete a line
  036          003 046  		dmcmd ↑X		; leave i/d mode
  037                   		jrst .+1]		; and continue
  038                   	move a,x			; copy # of lines to hack
  039          026 011  delln0:	move x,vpos			; get vertical position
  040          026 005  	imulx x,nwrdln			; frobs to do
  041          026 061  	addi x,screen			; address of first word of cursor line
  042          026 061  	cain x,screen+<nlines-1>*nwrdln	; at bottom line?
  043          051 048  	 jrst delln1			; yup, just copy extra line in
  044                   	movei y,(x)			; make a copy
  045          026 005  	addx y,nwrdln			; address of next line
  046                   	hrli x,(y)			; make a BLT pointer
  047          026 061  	blt x,screen+<nlines-1>*nwrdln-1; copy the lines
  048  MACROS  008 037  delln1:	store ascii/     /+1,2(x)	; blanks
  049          026 005  	movei y,nwrdln-2-1(x)		; number to do
  050  MACROS  009 011  	addx x,3			; address offset
  051                   	hrli x,-1(x)			; complete pointer
  052                   	blt x,(y)			; zak!
  053          051 039  	sojg a,delln0			; loop for more lines
  054          026 033  	store %fword,saupdp		; updated the world
  055          044 006  	jrst ntiser			; and return
␈↓&	Display subroutines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 52␈↓'α
  001                   ; Character insert
  002                   
  003          024 019  inschr:	skipe dmp			; is this a DM?
  004          003 046  	 jrst [	dmcmd ↑P		; yes, enter i/d mode
  005          003 046  		dmcmd ↑\		; insert a character
  006          003 046  		dmcmd ↑X		; leave i/d mode
  007                   		jrst .+1]		; and continue
  008                   	move c,a			; copy character counter
  009          026 011  insch0:	move x,vpos			; get vertical position
  010          026 005  	imulx x,nwrdln			; now number of words
  011                   	move a,x			; copy it for hacking
  012          026 061  	addi a,screen+nwrdln+3		; address of last text word
  013          026 012  	move y,hpos			; get horizontal position
  014                   	idivx y,5			; make it words
  015          026 061  	addi x,screen+2(y)		; address of word with cursor
  016                   	ldb y,[010700,,(x)]		; first character in next word
  017                   	ldb b,[	103400,,(x)
  018                   		102500,,(x)
  019                   		101600,,(x)
  020                   		100700,,(x)
  021                   		100000,,(x)](z)
  022                   	dpb b,[	013400,,(x)
  023                   		012500,,(x)
  024                   		011600,,(x)
  025                   		010700,,(x)
  026                   		010000,,(x)](z)
  027  MACROS  008 050  	movx b,<" >			; space in hole
  028                   	dpb b,[	350700,,(x)
  029                   		260700,,(x)
  030                   		170700,,(x)
  031                   		100700,,(x)
  032                   		010700,,(x)](z)
  033          052 044  	jrst insch1			; check for being done
  034                   
  035                   ; At each iteration Y has last character, X has next address
  036                   
  037                   insch2:	move z,y			; copy the character
  038                   	ldb y,[010700,,(x)]		; first character in next word
  039                   	dpb z,[000700,,(x)]		; last character here
  040                   	move z,(x)			; get word being hacked
  041                   	rot z,-7			; put characters in right place
  042  MACROS  010 057  	iorx z,1			; make sure bit 1.1 is on
  043                   	movem z,(x)			; save character in word
  044                   insch1:	came x,a			; at last address?
  045          052 037  	 aoja x,insch2			; nope
  046          026 032  	store %fword,scupdp		; some update somewhere
  047          026 011  	move x,vpos			; this line
  048          052 009  	sojg c,insch0			; loop for more characters
  049          026 031  	store %fword,slupdp(x)		; this line was hacked
  050          044 006  	jrst ntiser			; and return
␈↓&	Display subroutines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 53␈↓'α
  001                   ; Character delete
  002                   
  003          024 019  delchr:	skipe dmp			; is this a DM?
  004          003 046  	 jrst [	dmcmd ↑P		; yes, enter i/d mode
  005          003 046  		dmcmd ↑H		; delete a character
  006          003 046  		dmcmd ↑X		; leave i/d mode
  007                   		jrst .+1]		; and continue
  008                   	move c,x			; copy number of characters to hack
  009          026 011  delch0:	move x,vpos			; get current vertical position
  010          026 005  	imulx x,nwrdln			; number of words
  011                   	move a,x			; save it for later
  012          026 061  	addi a,screen+nwrdln-3		; address of last text word in line
  013          026 012  	move y,hpos			; get horizontal position
  014                   	idivx y,5			; number of words
  015          026 061  	addi x,screen+2(y)		; address of word with cursor
  016                   	ldb b,[	013400,,(x)
  017                   		012500,,(x)
  018                   		011600,,(x)
  019                   		010700,,(x)
  020                   		010000,,(x)](z)
  021                   	dpb b,[	103400,,(x)
  022                   		102500,,(x)
  023                   		101600,,(x)
  024                   		100700,,(x)
  025                   		100000,,(x)](z)
  026          053 034  	jrst delch1			; check for being done
  027                   
  028                   ; Each time around the iteration A had address of next word
  029                   
  030                   delch2:	ldb y,[350700,,(x)]		; last character in previous
  031                   	dpb y,[010700,,-1(x)]		; to previous
  032                   	ldb y,[013400,,(x)]		; get last characters in this word
  033                   	dpb y,[103400,,(x)]		; put back left justified
  034                   delch1:	came x,a			; done?
  035          053 030  	 aoja x,delch2			; not yet
  036  MACROS  008 050  	movx y,<" >			; get a space
  037                   	dpb y,[010700,,(x)]		; blank out last column
  038          026 032  	store %fword,scupdp		; screen updated someplace
  039          026 011  	move x,vpos			; get this line
  040          053 009  	sojg c,delch0			; hack another character
  041          026 031  	store %fword,slupdp(x)		; flag this line hacked
  042          044 006  	jrst ntiser			; and return
␈↓&	Display update subroutines                                       SUPDUP.MID[NET,MRC] 11/06/77  Page 54␈↓'α
  001                   subttl Display update subroutines
  002                   
  003          024 024  scnupd:	skipe prtp			; printing console?
  004          055 041  	 jrst prtout			; yes, update for printing console
  005          024 027  	skipe slowip			; in slow mode?
  006          054 015  	 jrst scnup1			; yes, good enough
  007          002 048  	movx x,<-nlines,,>		; load pointer to line update table
  008  MACROS  003 010  	movx y,%zeros			; initialize line count
  009          026 031  	skipe slupdp(x)			; does this line need hacking?
  010  MACROS  009 011  	 addx y,1			; yup, bump count
  011                   	aobjn x,.-2			; try for more lines
  012          024 021  	skipn iiip			; III always updates everything
  013          002 052  	 caxl y,nlnupd			; three lines or so?
  014          026 033  	  store %fword,saupdp		; yup, must update screen
  015          026 033  scnup1:	aose saupdp			; update entire screen?
  016          054 064  	 jrst scupd1			; nope, maybe selective
  017          026 032  	store %zeros,scupdp		; clear other update flags
  018          026 031  	store %zeros,slupdp,slupdp+nlines-1; . . .
  019          024 019  	skipe dmp			; is this a DM?
  020          056 048  	 jrst [	call dmout		; yes, output the buffer
  021          054 027  		jrst csrupd]		; and update the cursor
  022          027 027  	upgiot sdisp			; output new screen
  023                   ;	jrst csrupd			; now update cursor
  024                   
  025                   ; Update cursor
  026                   
  027          024 019  csrupd:	skipe dmp			; is this a DM?
  028          003 046  	 jrst [	dmcmd ↑L		; yes, send a cursor pos
  029          026 012  		move x,hpos		; horizontal position
  030  MACROS  010 064  		xorx x,140		; DM crock
  031          056 005  		call dmchar		; output it
  032          026 011  		move x,vpos		; vertical position
  033  MACROS  009 011  		addx x,2		; room for who line
  034  MACROS  010 064  		xorx x,140		; DM crock
  035          056 005  		call dmchar		; output it
  036          056 048  		jrst dmout]		; force it out and return
  037          024 020  	skipn ddp			; is this a DD?
  038  MACROS  003 059  	 return				; nope, too bad III
  039          048 018  	call glnini			; clear cursor line
  040          026 013  	skipge x,ovpos			; got an old position?
  041                   	 jrst .+3			; nope, don't try to clear old
  042          055 005  	  call getcsy			; get cursor vertical position
  043          027 034  	  ddupg cdisp			; clear cursor
  044          026 012  	move x,hpos			; horizontal character position
  045                   	imulx x,6			; horizontal bit position
  046  MACROS  009 011  	addx x,2			; graphics mode hack
  047                   	idivx x,32.
  048                   	movns y
  049  MACROS  008 050  	movx z,(740000)
  050                   	lsh z,(y)
  051                   	ldb a,[010300,,z]
  052                   	rot a,-3
  053  MACROS  010 059  	andx z,777777777760
  054  MACROS  010 057  	iorx z,2
  055  MACROS  010 057  	iorx a,2
  056          027 005  	movem z,scc+2(x)
  057          027 005  	movem a,scc+3(x)
  058          026 011  	move x,vpos			; get current vertical position
  059          026 013  	movem x,ovpos			; save as old position
  060          055 005  	call getcsy			; get cursor vertical position
  061          027 034  	ddupg cdisp			; and send it all out
  062  MACROS  003 059  	return				; finally return
  063                   
  064          026 032  scupd1:	aose scupdp			; did any update happen?
  065          054 072  	 jrst scupd2			; nope, try for just cursor
  066          002 048  	movx x,<-nlines,,>		; load line pointer
  067          026 031  scup1a:	skipe slupdp(x)			; need to hack this line?
  068          055 014  	 call updlin			; yup
  069          054 067  	aobjn x,scup1a			; loop for next line
  070          054 027  	jrst csrupd			; now update cursor
  071                   
  072          026 034  scupd2:	aose crupdp			; was cursor hacked
  073  MACROS  003 059  	 return				; nope, just return
  074          054 027  	jrst csrupd			; yes, then hack the cursor
␈↓&	Display update subroutines                                       SUPDUP.MID[NET,MRC] 11/06/77  Page 55␈↓'α
  001                   ; More display updating stuff
  002                   
  003                   ; Set up display program vertical position
  004                   
  005                   getcsy:	imulx x,12.
  006  MACROS  009 011  	addx x,24.+10.
  007          027 005  	dpb x,[140400,,scc+1]
  008                   	lsh x,-4
  009          027 005  	dpb x,[240500,,scc+1]
  010  MACROS  003 059  	return				; and return
  011                   
  012                   ; Display a single line
  013                   
  014          026 031  updlin:	store %zeros,slupdp(x)		; am updating now
  015                   	hrrz y,x			; line number
  016          026 005  	imulx y,nwrdln			; word position
  017          026 061  	addi y,screen			; address of start of line
  018          027 041  	hrrm y,ldisp			; hack up line display command
  019          027 041  	movem y,ldisp+3			; . . .
  020                   	hrrz z,x			; get line number again
  021                   	imulx z,12.
  022  MACROS  009 011  	addx z,24.			; starting raster number
  023          027 014  	move a,linprg			; program
  024                   	dpb z,[140400,,a]		; zap in low 4 bits of address
  025                   	lsh z,-4			; throw low bits away
  026                   	dpb z,[240500,,a]		; high 5 bits of address
  027                   	movem a,(y)			; save this command
  028          027 015  	move a,linpr1			; go to column 2
  029                   	movem a,1(y)			; save this command
  030          026 005  	store %zeros,nwrdln-1(y)	; clear word at EOL
  031          024 019  	skipn dmp			; don't do this if a DM
  032          027 041  	 upgiot ldisp			; display the line
  033  MACROS  008 050  	movx a,1			; nothingness
  034                   	movem a,(y)			; zap command
  035                   	movem a,1(y)			; . . .
  036          026 005  	aos nwrdln-1(y)			; put back 5 nulls
  037  MACROS  003 059  	return				; now return
  038                   
  039                   ; Printing console update routine
  040                   
  041  MACROS  003 009  prtout:	movx z,%fword			; my console
  042  SAIDFS  001 105  	getlin z			; get line characteristics now
  043  MACROS  003 056  	save z				; save old status
  044          023 024  	txz z,echarr			; turn off arrow mode
  045  SAIDFS  001 106  	setlin z			; . . .
  046          027 058  	outstr dmpgm			; nope, output the old one
  047  MACROS  003 057  	retr z				; get old status back
  048  SAIDFS  001 106  	setlin z			; and reset it
  049          027 058  	store %zeros,dmpgm,dmpgm+dmbufl-1; clear the old program
  050          027 060  	store <5*dmbufl>-4,dmcnt	; initialize counter
  051          027 058  	move [440700,,dmpgm]		; initialize pointer
  052          027 061  	movem dmpnt			; . . .
  053  MACROS  003 059  	return				; and return
␈↓&	DM display routines                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 56␈↓'α
  001                   subttl DM display routines
  002                   
  003                   ; Character output to DM
  004                   
  005          027 060  dmchar:	sosg dmcnt			; any room in buffer?
  006          056 048  	 call dmout			; nope, output the buffer
  007          027 061  	idpb x,dmpnt			; save character
  008  MACROS  003 059  	return				; and return
  009                   
  010                   ; Redraw DM screen, always skips(!), aborts any undone DM output
  011                   
  012          024 019  dmredw:	skipn dmp			; is this a DM?
  013          065 030  	 jrst cpopj1			; no, skip return
  014          027 058  	store %zeros,dmpgm,dmpgm+dmbufl-1; clear the old program
  015          027 060  	store <5*dmbufl>-4,dmcnt	; initialize DM counter
  016          027 058  	move [440700,,dmpgm]		; initialize DM pointer
  017          027 061  	movem dmpnt			; . . .
  018          026 011  	save hpos ? save vpos		; save current cursor position
  019          003 046  	dmcmd ↑←			; bop the screen
  020          003 046  	dmcmd ↑L			; set cursor postion
  021  MACROS  008 050  	movx x,140			; beginning of line
  022          056 005  	call dmchar			; set X position
  023  MACROS  008 050  	movx x,142			; second line from top
  024          056 005  	call dmchar			; output that too
  025          026 011  	store %zeros,vpos		; starting at top
  026          024 012  	movn z,tcmxv			; get number of lines
  027                   	hrlzs z				; make it an AOBJN pointer
  028          026 005  dmdrw1:	movx y,nwrdln			; number of words to offset
  029                   	imuli y,(z)			; compute offset from start of screen
  030          026 061  	add y,[440700,,screen+1]	; absolute address of line's characters-1
  031          026 012  	store %zeros,hpos		; start at beginning of line
  032                   dmdrw2:	ildb x,y			; get a character from the line
  033          056 032  	jumpe x,dmdrw2			; flush nulls
  034          056 005  	call dmchar			; output the character
  035          026 012  	aos x,hpos			; bump horizontal position
  036          024 013  	came x,tcmxh			; gotten to end of the line?
  037          056 032  	 jrst dmdrw2			; yes
  038          026 012  	store %zeros,hpos		; end of this line
  039          026 011  	aos vpos			; bump vertical position
  040          003 046  	dmcmd ↑M			; new line
  041          056 028  	aobjn z,dmdrw1			; and loop for next line
  042          026 012  	retr vpos ? retr hpos		; get back old cursor position
  043  MACROS  003 054  	aos (p)				; bump return PC
  044                   ;	jrst dmout			; and output the mess
  045                   
  046                   ; Buffer output to DM; called when DM buffer full or want to force buffer out
  047                   
  048          027 058  dmout:	skipn dmpgm			; any program there?
  049  MACROS  003 059  	 return				; lets not get overenthusiastic
  050          027 061  	hrrz dmpnt			; get current value of pointer
  051          027 058  	subi dmpgm-1			; compute number of words used
  052          027 055  	movem dmdisp+1			; set number of words to do
  053          027 055  	upgiot dmdisp			; output DM program
  054          026 012  	movs hpos			; get current X position
  055          026 011  	hrr vpos			; and Y position
  056  MACROS  009 011  	addx 0,2			; give the who line some space
  057  SAIDFS  001 310  	cursor				; bop the cursor to last position
  058          027 058  	store %zeros,dmpgm,dmpgm+dmbufl-1; clear the old program
  059          027 060  	store <5*dmbufl>-4,dmcnt	; initialize DM counter
  060          027 058  	move [440700,,dmpgm]		; initialize DM pointer
  061          027 061  	movem dmpnt			; . . .
  062  MACROS  008 050  	movx 0,177			; quote
  063          027 061  	idpb dmpnt			; put in buffer
  064  MACROS  008 050  	movx 0,↑L			; cursor position
  065          027 061  	idpb dmpnt			; bufferify
  066          026 012  	move hpos			; horizontal position
  067  MACROS  010 064  	xorx 0,140			; DM crock
  068          027 061  	idpb dmpnt			; bop away
  069          026 011  	move vpos			; vertical position
  070  MACROS  009 011  	addx 0,2			; who line space
  071  MACROS  010 064  	xorx 0,140			; DM crock
  072          027 061  	idpb dmpnt			; bop away
  073  MACROS  003 059  	return				; and return
␈↓&	SUPDUP commands                                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 57␈↓'α
  001                   subttl SUPDUP commands
  002                   
  003  SAIDFS  001 099  cmdcmd:	inchrw x			; get command character
  004                   	ldb y,[001000,,x]		; get αcharacter
  005                   	caxl y,"a			; lowercase?
  006                   	 caxle y,"z			; . . .
  007                   	  caxa				; no
  008  MACROS  010 028  	   txz x,<" >			; yes, uppercasify
  009                   	caxn x,"H			; [HELP]?
  010          021 070  	 jrst [	txo x,%txtop		; TOPify
  011          060 024  		jrst imgsnd]		; and send it out
  012                   	caxe x,"K			; logout foreign job?
  013                   	 caxn x,"L			; . . .
  014  MACROS  008 050  	  jrst [movx x,300		; escape code
  015          041 044  		call netoc1		; prepare for escape
  016  MACROS  008 050  		movx x,301		; kill other job code
  017          041 044  		call netoc1		; send it too
  018          041 033  		call netsnd		; now send this command out
  019  SAIDFS  001 056  		outstr [asciz/Logged out foreign job./]
  020          057 022  		jrst @quit]		; and die
  021                   	caxn x,"Q			; quit?
  022                   quit:	 jrst [	hrroi y,[004000,,400\"N]; yes, [BREAK]N
  023          024 024  		skipn prtp		; not on printing consoles
  024  SAIDFS  001 294  		 ttyset y,		; clear the screen
  025  SAIDFS  001 193  		exit]			; and exit out
  026          024 024  	skipe prtp			; these next are only for displays
  027          060 003  	 jrst prtcmd			; so skip them if printing console
  028                   
  029                   ; (continued on next page)
␈↓&	SUPDUP commands                                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 58␈↓'α
  001                   ; Display only commands
  002                   
  003                   	caxn x,"F			; fast mode?
  004          024 027  	 jrst [	store %zeros,slowip	; yes
  005  SAIDFS  001 102  		outstr [asciz/Fast display mode!
  006                   /]
  007          041 003  		jrst ttiser]		; and continue hacking
  008                   	caxe x,"?			; help?
  009                   	 caxn x,"P			; page printer restore?
  010                   	  jrst [caxn x,"?		; was it a help?
  011                   		 jsp z,[hrroi y,[004000,,"C]; [ESCAPE]C
  012  SAIDFS  001 294  			ttyset y,	; clear the screen
  013  SAIDFS  001 302  			ppsel 400002	; yes, select PP 2 but don't activate yet
  014          061 003  			outstr hlptxt	; display help text
  015  SAIDFS  001 303  			ppact 100000	; now activate PP 2
  016                   			jrst 3(z)]	; and continue
  017  SAIDFS  001 303  		ppact 400000		; activate PP 0
  018                   		hrroi y,[004000,,400\"P]; [BREAK]P
  019  SAIDFS  001 294  		ttyset y,		; refresh screen
  020  MACROS  003 059  		outstr [asciz/Type any character to return to ITS:/]
  021  MACROS  008 050  		movx y,1		; just one second
  022          024 019  		skipn dmp		; is this a DM?
  023  SAIDFS  001 207  		 sleep y,		; no, cretin data risc needs delay
  024                   		hrroi y,[004000,,"W]	; and [ESCAPE]W
  025  SAIDFS  001 294  		ttyset y,		; to restore who-line
  026  SAIDFS  001 099  		inchrw y		; get a character
  027  SAIDFS  001 102  		outstr [asciz/
  028                   /]
  029  SAIDFS  001 108  		clrbfi			; flush any other input (like CRLF)
  030                   		caxn x,"?		; was it a help frob?
  031  SAIDFS  001 306  		 pprel 2		; flush temporary page printer
  032          058 041  		jrst @review]		; and review screen
  033                   	caxn x,"R			; screen record crock?
  034          062 003  	 jrst record			; yes, write record file
  035                   	caxn x,"S			; slow mode?
  036          024 027  	 jrst [	store %fword,slowip	; yes
  037  SAIDFS  001 102  		outstr [asciz/Slow display mode!
  038                   /]
  039          041 003  		jrst ttiser]		; and continue gobbling input
  040                   	caxn x,"V			; re-view screen?
  041  SAIDFS  001 308  review:	 jrst [	leypos 2000		; line editor off screen
  042  SAIDFS  001 303  		ppact			; flush all PP's
  043          024 020  		skipn ddp		; is this a DD?
  044          056 012  		 call dmredw		; redraw the whole screen
  045          027 021  		  ddupg sclear		; zap screen
  046                   		hrroi y,[004000,,"W]	; [ESCAPE]W
  047  SAIDFS  001 294  		ttyset y,		; restore who-line quickly
  048          026 033  		store %fword,saupdp	; must redisplay whole screen
  049          054 003  		call scnupd		; update screen
  050          024 034  		store %zeros,ntiinp	; clear output resets
  051          041 003  		jrst ttiser]		; all done
  052                   
  053                   ; (continued on next page)
␈↓&	SUPDUP commands                                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 59␈↓'α
  001                   ; Esoteric character mappings (all magical)
  002                   
  003          021 066  	caxe y,%txctl\"z		; αz or αβz?
  004          021 066  	 caxn y,%txctl\"Z		; αZ or αβZ?
  005          060 024  	  jrst imgsnd			; yes, send it in image form
  006          021 066  	caxn y,%txctl\"_		; α_ or αβ_?
  007  MACROS  009 011  	 jrst [	addx x,"←-"_		; map it first
  008          060 024  		jrst imgsnd]		; and send it
  009          021 066  	txz y,%txctl			; flush αification
  010                   	caxn y,".			; centered-dot?
  011          021 070  	 jrst [	addx x,%txtop-".	; yes
  012          060 024  		jrst imgsnd]		; and send it
  013                   	caxe y,↑I			; gamma?
  014                   	 caxn y,↑J			; delta?
  015          021 070  	  jrst [addx x,%txtop		; yes
  016          060 024  		jrst imgsnd]		; and send it
  017                   	caxe y,↑M			; circle-plus?
  018                   	 caxn y,177			; integral?
  019          021 070  	  jrst [addx x,%txtop		; yes
  020          060 024  		jrst imgsnd]		; and send it
  021                   	caxn y,"∂			; [NULL]?
  022  MACROS  009 019  	 jrst [	subx x,"∂		; yes
  023          060 024  		jrst imgsnd]		; and send it
  024                   	caxe y,"␈λ			; ␈λ?  [BACK SPACE]
  025                   	 caxn y,"∨			; ∨?  [BACK NEXT]
  026          060 024  	  jrst imgsnd			; yes, send it
  027                   	caxn y,"≠			; ≠?  [CALL]
  028  MACROS  009 019  	 jrst [	subx x,"≠-"~		; yes, convertify (cretin character set)
  029          060 024  		jrst imgsnd]		; yes, send it
  030                   	caxn y,"α			; α?  [ESCAPE]
  031          021 070  	 jrst [	addx x,%txtop\<"A-"α>	; yes, change α to [ESCAPE]
  032          060 024  		jrst imgsnd]		; and send it
  033                   	caxn y,"β			; β?  [BREAK]
  034          021 070  	 jrst [	addx x,%txtop\<"B-"β>	; yes, change β to [BREAK]
  035          060 024  		jrst imgsnd]		; and send it
  036                   	caxn y,"ε			; ε?  [CLEAR]
  037          021 070  	 jrst [	addx x,%txtop\<"C-"ε>	; yes, change ε to [CLEAR]
  038          060 024  		jrst imgsnd]		; and send it
  039                   	caxn y,"↑			; ↑?  uparrow
  040          021 070  	 jrst [	addx x,%txtop+013-"↑	; yes, change ↑ to uparrow
  041          060 024  		jrst imgsnd]		; and send it
␈↓&	SUPDUP commands                                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 60␈↓'α
  001                   ; Magic DDT command, subroutines, etc.
  002                   
  003                   prtcmd:	caxn y,"?			; want help?
  004          061 021  	 jrst [	outstr hlptx1		; yes
  005          041 003  		jrst ttiser]		; now get characters
  006                   
  007          002 043  ifn ddtp,[; This undocumented command automagically bops you into DDT if present.
  008                   
  009                   	caxn x,"D			; enter DDT | RAID?
  010          028 048  	 jrst [	call ddtcal		; call DDT
  011          041 003  		jrst ttiser]		; return from DDT, return to user
  012                   ];ddtp
  013                   
  014                   ; If not a command or a magical character, burp
  015                   
  016  SAIDFS  001 100  	outchr ["']			; quote it
  017  SAIDFS  001 100  	outchr x			; output the loser
  018          019 017  	burp [asciz/' is an illegal command character.
  019                   /]
  020  MACROS  003 009  	movx x,%fword			; to myself
  021  SAIDFS  001 286  	beep x,				; breedle!
  022          041 003  	jrst ttiser			; now continue
  023                   
  024          024 036  imgsnd:	store %fword,imgchp		; image characters now
  025          042 003  	call netoch			; send it too
  026          041 033  	call netsnd			; send it out
  027          041 003  	jrst ttiser			; and try for another
␈↓&	SUPDUP commands                                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 61␈↓'α
  001                   ; SUPDUP help text
  002                   
  003                   hlptxt:	asciz/Commands:
  004                   
  005  SAIDFS  001 311  F	New fast display mode		H	Send [HELP] ("help" key)
  006          057 022  K or L	Kill job and quit		P	View page printer
  007          062 003  Q	Detach job and quit		R	Write a screen record
  008          026 061  S	Old slow display mode		V	Re-draw screen
  009                   ?	Type this message
  010                   
  011                   Special mappings:
  012                   
  013                    .	centered-dot	[TAB]	gamma		[LF]	delta
  014                    [CR]	circle-plus	[BS]	integral	⊗	[NULL]
  015  MACROS  003 058   ␈λ	[BACK SPACE]	≠	[CALL]		∨	[BACK NEXT]
  016                    α	[ESCAPE]	β	[BREAK]		ε	[CLEAR]
  017                   
  018          019 017  ↑, α↑, β↑, αβ↑, αz, αβz, αZ, αβZ, α_, and αβ_ are not mapped in command mode.
  019                   /
  020                   
  021                   hlptx1:	asciz/
  022                   Commands:
  023                   
  024          057 022  H	Send [HELP] ("help" key)	K or L	Kill job and quit
  025          057 022  Q	Detach job and quit		?	Type this message
  026                   
  027          019 017  ↑E controllifies the next character, ↑↑ gets into command mode.
  028                   
  029                   /
␈↓&	Screen record crock                                              SUPDUP.MID[NET,MRC] 11/06/77  Page 62␈↓'α
  001                   subttl Screen record crock
  002                   
  003          024 044  record:	open dsk,[0 ? 'DSK,, ? dsobf,,]	; get a disk channel
  004          028 019  	 barf [asciz/Unable to OPEN the DSK!
  005                   /]
  006                   	hrroi x,[004000,,400\"N]	; [BREAK]N
  007  SAIDFS  001 294  	ttyset x,			; normalize screen
  008                   	hrroi x,[004000,,"W]		; [ESCAPE]W
  009  SAIDFS  001 294  	ttyset x,			; restore who-line
  010  MACROS  008 050  	movx x,1			; wait one second...
  011  SAIDFS  001 207  	sleep x,			; ... to let the dust settle
  012                   	hrroi x,[004000,,"P]		; [ESCAPE]P
  013  SAIDFS  001 294  	ttyset x,			; restore page printer
  014  SAIDFS  001 331  	ptjobx [0 ? sixbit/DON/]	; turn echoing on
  015  MACROS  003 009  	movx x,%fword			; this terminal
  016  SAIDFS  001 105  	getlin x			; get line characteristics
  017          023 027  	txz x,spcbrk			; special activation mode bit
  018  SAIDFS  001 106  	setlin x			; leave SAM
  019  SAIDFS  001 112  	setact [[777777,,777777		; activate on 000 - 043
  020                   		 777700,,037600		;  044 - 107
  021                   		 000000,,374000		;  110 - 153
  022                   		 000007,,600000]]	;  154 - 177
  023          026 061  	outstr [asciz/Writing screen record.../]
  024          002 048  	movx x,<-nlines,,>		; number of lines to write
  025          026 005  recrd1:	movx y,nwrdln			; number of words to offset
  026                   	imuli y,(x)			; compute offset from start of screen
  027          026 061  	add y,[440700,,screen+1]	; absolute address of line's characters-1
  028                   recrd2:	ildb z,y			; get a character from the line
  029          062 028  	jumpe z,recrd2			; bop away nulls
  030          024 044  	sosg dsobf+2			; any room in the buffer?
  031  SAIDFS  001 056  	 out dsk,			; no, dump out what's there now
  032                   	  caxa				; won
  033          028 019  	   barf [asciz/Disk OUT failed!
  034                   /]
  035          024 044  	idpb z,dsobf+1			; save character
  036                   	caxe z,↑J			; hit the line feed yet?
  037          062 028  	 jrst recrd2			; not yet
  038          062 025  	aobjn x,recrd1			; won
  039  SAIDFS  001 065  	close dsk,			; close off file
  040  SAIDFS  001 066  	release dsk,			; free up channel
  041  SAIDFS  001 331  	ptjobx [0 ? sixbit/DOFF/]	; turn echoing off
  042  MACROS  003 009  	movx x,%fword			; this line
  043  SAIDFS  001 105  	getlin x			; get line characteristics
  044          023 027  	txo x,spcbrk			; special activation mode bit
  045  SAIDFS  001 106  	setlin x			; enter SAM
  046  SAIDFS  001 112  	setact [[777777,,777777		; activate on 000 - 043
  047                   		 777777,,777777		;  044 - 107
  048                   		 777777,,777777		;  110 - 153
  049          023 017  		 777777,,600000\allact\bsact\supscm\supccr]]; 154 - 177, αβ act
  050  SAIDFS  001 303  	ppact				; flush PP 0
  051          058 041  	jrst @review			; and redraw screen
␈↓&	Network error analysis                                           SUPDUP.MID[NET,MRC] 11/06/77  Page 63␈↓'α
  001                   subttl Network error analysis
  002                   
  003                   ; Connection refused
  004                   
  005          063 005  refuse:	outstr [asciz/Refused./]
  006  SAIDFS  001 193  	exit
  007                   
  008                   ; Connection closed by foreign host
  009                   
  010          063 010  closed:	outstr [asciz/Host closed connection./]
  011  SAIDFS  001 193  	exit
  012                   
  013                   ; Failed to get socket number from logger
  014                   
  015  SAIDFS  001 059  nosock:	getsts icp,y			; get channel status of loser
  016          064 008  	jrst iioerr			; and report why it happened
  017                   
  018                   ; CONNECT MTAPE error codes
  019                   
  020                   define cnemes code,message/
  021          017 019   ifn 1+.-cnetab-code,.err code is out of order
  022                    [asciz/message/]
  023                   termin
  024                   
  025          023 062  cnetab:	cnemes siu,Socket already in use.
  026          023 063  	cnemes ccs,Can't change socket numbers.
  027          023 064  	cnemes sys,Horrible system error.
  028          023 065  	cnemes nla,No links available.
  029          023 066  	cnemes ilb,Illegal byte size.
  030          023 067  	cnemes idd,Local NCP dead.
  031          063 025  cnemax==1+.-cnetab
  032                   
  033                   ; CONNECT MTAPE failed
  034                   
  035  MACROS  010 059  conerr: andx x,77			; only error code
  036          063 031  	caxl x,cnemax			; error code too high?
  037  MACROS  009 004  	 jrst [	outstr [asciz/Connection failed, code #/]
  038                   		idivx x,10		; split into two digits
  039                   		repeat 2,[
  040  MACROS  009 011  		 addx x+.rpcnt,"0	; ASCIIify
  041  SAIDFS  001 100  		 outchr x+.rpcnt	; output the digit
  042                   		]			; once for each digit
  043  SAIDFS  001 100  		outchr [".]		; final dot
  044  SAIDFS  001 193  		exit]			; and die
  045          063 025  	outstr @cnetab-1(x)		; output error message
  046  SAIDFS  001 193  	exit				; and exit
␈↓&	Network error analysis                                           SUPDUP.MID[NET,MRC] 11/06/77  Page 64␈↓'α
  001                   ; More network error reporting
  002                   
  003                   ; IMP I/O error
  004                   
  005  SAIDFS  001 059  nioerr:	getsts net,y			; get error status
  006          024 028  	skipe clsedp			; known that it was closing?
  007          063 010  	 jrst closed			; okay, report that instead
  008          023 058  iioerr:	andx y,ioimpm\ioderr\iodter\iobktl\iodend\hdead\ctrov\rset\tmo
  009          023 055  	txzn y,hdead
  010          064 016  	 jrst cctrov
  011          023 073  	txz y,ioderr\iodter		; clear other error bits
  012  SAIDFS  001 102  	outstr [asciz/Host dead./]
  013  SAIDFS  001 193  	jumpe y,[exit]			; punt if done
  014  SAIDFS  001 102  	outstr [asciz/
  015                   /]
  016          023 056  cctrov:	txnn y,ctrov
  017          064 023  	 jrst crset
  018          023 073  	txz y,ioderr\iodter		; clear other error bits
  019  SAIDFS  001 102  	outstr [asciz/Host exceeded allocation./]
  020  SAIDFS  001 193  	jumpe y,[exit]			; punt if done
  021  SAIDFS  001 102  	outstr [asciz/
  022                   /]
  023          023 057  crset:	txnn y,rset
  024          064 030  	 jrst ctmo
  025          023 073  	txz y,ioderr\iodter		; clear other error bits
  026  SAIDFS  001 102  	outstr [asciz/Host reset./]
  027  SAIDFS  001 193  	jumpe y,[exit]			; punt if done
  028  SAIDFS  001 102  	outstr [asciz/
  029                   /]
  030          023 058  ctmo:	txnn y,tmo
  031          064 037  	 jrst ceof
  032          023 073  	txz y,ioderr\iodter		; clear other error bits
  033  SAIDFS  001 102  	outstr [asciz/Time out./]
  034  SAIDFS  001 193  	jumpe y,[exit]			; punt if done
  035  SAIDFS  001 102  	outstr [asciz/
  036                   /]
  037          023 075  ceof:	txnn y,iodend
  038          064 044  	 jrst cbktl
  039          023 073  	txz y,ioderr\iodter		; clear other error bits
  040  MACROS  004 015  	outstr [asciz/End of file./]
  041  SAIDFS  001 193  	jumpe y,[exit]			; punt if done
  042  SAIDFS  001 102  	outstr [asciz/
  043                   /]
  044          023 071  cbktl:	txne y,iobktl\ioimpm		; argh!!!
  045          023 074  	 barf [asciz/IOIMPM or IOBKTL!
  046                   Find a wizard./]
  047                   
  048                   ; Occasionally IODTER and IODERR get set with nothing else.
  049                   
  050          023 073  	txze y,iodter			; for this bit or the other
  051          023 072  	 txo y,ioderr			; or both
  052          023 072  	caxn y,ioderr			; for when only this bit is set
  053  SAIDFS  001 102  	 outstr [asciz/Incomplete transmission./]
  054  SAIDFS  001 193  	exit				; and die
␈↓&	Random routines, literals, etc.                                  SUPDUP.MID[NET,MRC] 11/06/77  Page 65␈↓'α
  001                   subttl Random routines, literals, etc.
  002                   
  003                   ; Here if could not get terminal name; give a random string
  004                   
  005  MACROS  003 054  rndtid:	burp [asciz/Unable to get terminal's location from ROOMS[P,DOC].
  006                   /]
  007                   	move y,[440700,,[asciz/Unknown Data Disc/]]
  008          024 021  	skipe iiip			; is it a III?
  009                   	 move y,[440700,,[asciz/Unknown III/]]
  010          024 024  	skipe prtp			; printing console?
  011                   	 move y,[440700,,[asciz/Unknown TTY/]]
  012          024 019  	skipn dmp			; is it a DM?
  013          065 016  	 jrst sndid1			; no
  014                   	skipa y,[440700,,[asciz/Unknown Datamedia/]]
  015                   rndrom:	 move y,[440700,,[asciz/Unassigned Room/]]
  016                   sndid1:	ildb x,y			; get a character
  017          041 044  	call netoc1			; send it
  018          065 016  	jumpn x,sndid1			; and continue if not done
  019          038 062  	jrst tidone			; all done
  020                   
  021                   ; Here to get a character from terminal rooms table
  022                   
  023          024 043  getch:	sosg dsibf+2			; buffer ready?
  024  SAIDFS  001 055  	 in dsk,			; no, get one then
  025                   	  caxa				; won
  026          065 005  	   jrst rndtid			; lost, send random name
  027          024 043  	ildb x,dsibf+1			; get a character
  028          065 023  	jumpe x,getch+1			; flush nulls
  029                   	caxe x,↑M			; hit a terpri?
  030  MACROS  003 054  cpopj1:	 aos (p)			; no, bump return PC
  031  MACROS  003 059  	return				; now return
  032                   
  033                   ; For handling REENTER command
  034                   
  035          065 037  tmploc jobren,rensvr			; re-entry point
  036                   
  037  SAIDFS  001 151  rensvr:	skipe jobopc			; was I interrupted?
  038  SAIDFS  001 151  	 jrst 2,@jobopc			; yup, then continue
  039          030 007  	jrst supdup			; no, just start then
  040                   
  041                   ; Literals
  042                   
  043                   ...lit:	variables			; don't like variables!
  044          065 043  if1,ifn .-...lit,.err Variables lose lose lose
  045                   
  046                   	constants			; generate constants
  047                   
  048                   sdpff=.					; first free location in SUPDUP
  049                   
  050          030 007  end SUPDUP
Symbol Table for:    SUPDUP.MID[NET,MRC]                                     11/06/77  Page I
                     

%TDBEL = 022 022   %TXASC = 021 065   DDCMD  M 003 038   ICPSKT = 002 045   NETOC1   041 044   SCEL   = 026 055 
%TDBOW = 022 028   %TXCTL = 021 066   DDDLIN = 023 023   IDD    = 023 067   NETOC2   043*008   SCLEAR   027 021 
%TDBS  = 022 014   %TXMTA = 021 067   DDP      024 020   IIIHDR   026 046   NETOC3   043 026   SCNHST   033 012 
%TDCLR = 022 021   %TXSFL = 021 069   DDTCAL   028 048   IIIP     024 021   NETOCH   042 003   SCNUP1   054 015 
%TDCRL = 022 012   %TXSFT = 021 068   DDTP   = 002 043   IIOERR   064 008   NETP     024 023   SCNUPD   054 003 
%TDDCP = 022 027   %TXTOP = 021 070   DEBUGP   026 040   ILB    = 023 066   NETSER   029 024   SCP      026 059 
%TDDLF = 022 009   ...LIT   065 043   DEFINE   019*020   IMGCHP   024 036   NETSND   041 033   SCPL   = 026 064 
%TDDLP = 022 025   ALLACT = 023 014   DELCH0   053 009   IMGSND   060 024   NGW    = 026 007   SCREEN   026 061 
%TDEOF = 022 007   ALLIMP   046 030   DELCH1   053 034   IMPBIT = 023 026   NIOERR   064 005   SCREND = 026*062 
%TDEOL = 022 008   ALLOMP   043 058   DELCH2   053 030   IMPBYT   025 009   NLA    = 023 065   SCRIN1   048 011 
%TDFS  = 022 019   ARE      019 039   DELCHR   053 003   IMPCOD   025 005   NLINES = 002 048   SCRINI   048 005 
%TDICP = 022 026   AS       017 013   DELLIN   051 033   IMPFSK   025 010   NLNGLT = 002 050   SCRSIZ = 026 006 
%TDILP = 022 024   BADHST   033 030   DELLN0   051 039   IMPHST   025 011   NLNUPD = 002 052   SCSTOR   048 023 
%TDINI = 022 023   BARF   = 028 019   DELLN1   051 048   IMPLSK   025 007   NOEEOB = 023 042   SCUP1A   054 067 
%TDLF  = 022 015   BITS   G 011 029   DISLIN = 023 021   IMPSTA   025 006   NOEEOL = 023 041   SCUPD1   054 064 
%TDMAX = 022 030   BITS   G 016 033   DMBUFL = 002 047   IMPWAT   025 008   NOSOCK   063 015   SCUPD2   054 072 
%TDMOV = 022 005   BOTLIN = 026 065   DMCHAR   056 005   INPMAP   046 020   NOTE     006 036   SCUPDP   026 032 
%TDMTF = 022 010   BREDLE   050 005   DMCMD  M 003 046   INSCH0   052 009   NOTE     006 040   SDISP    027 027 
%TDMTN = 022 011   BSACT  = 023 015   DMCNT    027 060   INSCH1   052 044   NOTE     010 003   SDPDPY   031 039 
%TDMV0 = 022 020   BURP   = 028 018   DMDISP   027 055   INSCH2   052 037   NOTE     011 042   SDPFF  = 065 048 
%TDMV1 = 022 006   CBKTL    064 044   DMDRW1   056 028   INSCHR   052 003   NOTES    020 050   SDTTOP = 021 009 
%TDNOP = 022 013   CCS    = 023 063   DMDRW2   056 032   INSLIN   051 005   NSCLIN = 002 051   SDTTOP = 021 016 
%TDORS = 022 017   CCTROV   064 016   DMLIN  = 023 022   INSLN0   051 011   NTIBF    024 041   SEARCH   038 003 
%TDQOT = 022 018   CDISP    027 034   DMOUT    056 048   INSLN1   051 017   NTIINP   024 034   SERCH1   038 021 
%TDRCR = 022 016   CEOF     064 037   DMP      024 019   INSLN2   051 022   NTISER   044 006   SERCH2   038 027 
%TDRST = 022 029   CHARAC G 005 036   DMPGM    027 058   INTCLK = 023 032   NTOBF    024 042   SET    G 010 013 
%TNDP  = 021*051   CHFHNM   032*006   DMPNT    027 061   INTERR G 011 050   NTOC2A   043 017   SET    G 012 005 
%TNDTM = 021*060   CLEOF1   050 035   DMREDW   056 012   INTIMS = 023 034   NTOINP   024 033   SIDE   G 005 017 
%TNESC = 021*059   CLEOL1   049 021   DOCUME   005 035   INTINP = 023 035   NULFLS   046 037   SIU    = 023 062 
%TNIML = 021*053   CLOSED   063 010   DONE     020 031   INTINR = 023*050   NWRDLN = 026 005   SLOWIP   024 027 
%TNMAX = 021*061   CLR1CH   049 029   DPYCTB   047 027   INTINS = 023 033   NXTTTY   038 029   SLUPDP   026 031 
%TNMEM = 021*056   CLREOF   050 033   DPYSER   047 003   INTINS = 023 051   ON     G 009 018   SNDID1   065 016 
%TNODP = 021*052   CLREOL   049 005   DPYSVR M 047 022   INTROD   018 006   ORESET   050 011   SNDROM   038 041 
%TNPRT = 021 050   CLRSCN   048 041   DSIBF    024 043   INTSER   029 003   OUTMAP   043 052   SNDTID   038 053 
%TNSFW = 021 057   CLSCOD   025 021   DSOBF    024 044   INTTTI = 023 036   OVPOS    026 013   SNTROM   038*060 
%TNTEK = 021*054   CLSEDP   024 028   ECHARR = 023 024   INTTTY = 023 031   PDL      024 049   SPCBRK = 023 027 
%TNTRM = 021*058   CLSR   = 023 049   ESCPIP   024 035   IOBKTL = 023 074   PDLLEN = 002 046   SUPCCR = 023 017 
%TNTV  = 021*055   CLSS   = 023 048   FEATUR   019 001   IODEND = 023 075   PGMBEG = 028 021   SUPDP1   030 036 
%TOALT = 021 021   CLSSKT   025 023   FILINP   024 025   IODERR = 023 072   PROCES G 008 035   SUPDUP   030 007 
%TOCID = 021 037   CLSSTA   025*022   FLSSPC   038 049   IODTER = 023 073   PRTCMD   060 003   SUPSCM = 023 016 
%TOCLC = 021 022   CLSWAT   025*024   FNDROM   038 035   IOIMPM = 023 071   PRTOUT   055 041   SWPRIN M 003 023 
%TOERS = 021 023   CMDCMD   057 003   FOLLOW   005 007   IS       017 019   PRTP     024 024   SYS    = 023 064 
%TOFCI = 021 034   CNEMAX = 063 031   FOLLOW   010 035   ITS      058 020   PTYLIN = 023 025   TCMXH    024 013 
%TOHDX = 021*024   CNEMES M 063 020   FORM     011 012   LDISP    027 041   PTYP     024 022   TCMXV    024 012 
%TOIML = 021*035   CNETAB   063 025   GETCH    065 023   LGRSKT   024*048   QUIT     057 022   TCTYP    024 010 
%TOLID = 021 036   CNSBLK   024 009   GETCSY   055 005   LINEL  = 002 049   RECORD   062 003   TERPRI   049 046 
%TOLWR = 021 033   CNSBLL = 024 015   GETHST   033 003   LINPR1   027 015   RECRD1   062 025   TIDONE   038 062 
%TOMOR = 021 030   CODES  G 012 006   GLNINI   048 018   LINPRG   027 014   RECRD2   062 028   TMO    = 023 058 
%TOMVB = 021 025   COMMAN   019 017   GOHPOS   026 018   LOCATI G 007 011   REFUSE   063 005   TRUNCA = 023 040 
%TOMVU = 021 029   COMMAN   061 003   GOICP    034 003   LOCK   G 009 025   RENSVR   065 037   TTCHSN   036 017 
%TOOVR = 021 028   COMMAN   061 022   GOVPOS   026 017   LOSER    039 038   RETNPC   024 054   TTIINP   024 032 
%TORAW = 021 032   CONERR   063 035   GRTDUN   036 032   LUZINT   029 018   REVIEW   058 041   TTISER   041 003 
%TOROL = 021 031   CORBEG = 024 007   GRTMSG   036 024   MAINLP   040 010   RFCR   = 023 047   TTISR1   041 005 
%TOSA1 = 021 027   COREND = 026 036   GTDCH    026 027   MAPIT  M 003 030   RFCS   = 023 046   TTYOPT   024 011 
%TOSAI = 021 026   COUNT  G 006 046   GTDLN    026 025   MAPPIN   019 003   RNDROM   065 015   TTYROL   024 014 
%TP11T = 021*043   CPOPJ1   065 030   GTHPOS   026 020   MAPPIN   019 010   RNDTID   065 005   UPDLIN   055 014 
%TPCBS = 021 042   CRSET    064 023   GTICH    026 026   MAPPIN   061 011   RSET   = 023 057   USE    M 021 013 
%TPIBC = 021*045   CRUPDP   026 034   GTILN    026 024   MENTIO   018*045   RUNCMP   024 026   UUOSER   028 025 
%TPIBM = 021*046   CSRAOS   050 024   GTVPOS   026 019   MODES    019*046   SAUPDP   026 033   VPOS     026 011 
%TPORS = 021 044   CSRUPD   054 027   HDEAD  = 023 055   MONCOM   032 008   SCBYTP   027 047   WATCOD   025 015 
%TPPCR = 021*039   CTLFYP   024 037   HLPTX1   061 021   MSKBTS   024 053   SCC      027 005   WATSKT   025 017 
%TPPLF = 021*038   CTMO     064 030   HLPTXT   061 003   NCHARS = 002 055   SCCL   = 027 010   WATSTA   025 016 
%TPPTB = 021*040   CTROV  = 023 056   HPOS     026 012   NETICH   046 005   SCE      026 053   ZZZZZZ   040 005 
%TPTEL = 021*041   DBUGP  = 002 042   
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page I
            

Key to types of symbol occurrences (Note references come last):

Space - ordinary reference.  ! - .SEE reference.
: - Label.  = - Assignment or EQUALS.  + - Macro.  * - Block.
' - Variable (or .SCALAR, .VECTOR).  " - Symbol made global.


%FWORD	  MACROS 003=009  SUPDUP 028-065 029-007 029-012 029-014 029-027 029-035 031-016 031-018 031-021 031-023 031-025
	 031-027 031-029 031-032 032-017 033-011 034-036 036-032 039-034 041-011 041-014 044-031 044-034 044-037 044-039
	 044-043 047-027 047-028 047-048 047-053 047-054 047-055 047-056 048-024 048-025 048-044 049-012 049-013 049-035
	 049-036 049-055 049-058 050-005 050-028 051-028 051-054 052-046 052-049 053-038 053-041 054-014 055-041 058-036
	 058-048 060-020 060-024 062-015 062-042  MACROS 010-018 010-030 010-039 010-039 010-048
%ICACF	  MACROS 003=015  SUPDUP 028-031
%ICOPC	  MACROS 003=014  SUPDUP 028-027
%TDBEL	  SUPDUP 022=022 013-038 047-050
%TDBOW	  SUPDUP 022=028 014-018 014-021 047-057 047-057
%TDBS	  SUPDUP 022=014 047-038 047-038
%TDCLR	  SUPDUP 022=021 013-035 047-049
%TDCRL	  SUPDUP 022=012 013-008 047-036
%TDDCP	  SUPDUP 022=027 008-057 014-012 047-056
%TDDLF	  SUPDUP 022=009 008-014 013-005 047-031
%TDDLP	  SUPDUP 022=025 008-053 013-047 047-054
%TDEOF	  SUPDUP 022=007 008-015 012-043 012-049 047-029
%TDEOL	  SUPDUP 022=008 008-014 012-047 012-053 047-030
%TDFS	  SUPDUP 022=019 013-027 047-047
%TDICP	  SUPDUP 022=026 008-057 014-005 047-055
%TDILP	  SUPDUP 022=024 008-053 013-040 047-053
%TDINI	  SUPDUP 022=023 047-051 047-051
%TDLF	  SUPDUP 022=015 047-040 047-040
%TDMAX	  SUPDUP 022=030 047-003 047-061 047-061
%TDMOV	  SUPDUP 022=005 012-019 012-031 012-032 045-011 047-014 047-023 047-027 047-061
%TDMTF	  SUPDUP 022=010 047-032 047-032
%TDMTN	  SUPDUP 022=011 047-034 047-034
%TDMV0	  SUPDUP 022=020 012-041 013-031 047-048
%TDMV1	  SUPDUP 022=006 012-038 047-028
%TDNOP	  SUPDUP 022=013 006-052 006-054 013-014 036-025 047-037
%TDORS	  SUPDUP 022=017 011-049 013-016 044-024 047-044
%TDQOT	  SUPDUP 022=018 013-020 047-045 047-045
%TDRCR	  SUPDUP 022=016 047-042 047-042
%TDRST	  SUPDUP 022=029 014-021 047-059 047-059
%TNDP	  SUPDUP 021=051
%TNDTM	  SUPDUP 021=060
%TNESC	  SUPDUP 021=059
%TNIML	  SUPDUP 021=053
%TNMAX	  SUPDUP 021=061
%TNMEM	  SUPDUP 021=056
%TNODP	  SUPDUP 021=052
%TNPRT	  SUPDUP 021=050 031-033
%TNSFW	  SUPDUP 021=057 031-006
%TNTEK	  SUPDUP 021=054
%TNTRM	  SUPDUP 021=058
%TNTV	  SUPDUP 021=055
%TOALT	  SUPDUP 021=021 008-009
%TOCID	  SUPDUP 021=037 008-055
%TOCLC	  SUPDUP 021=022 009-024
%TOERS	  SUPDUP 021=023 008-012 008-034 008-036
%TOFCI	  SUPDUP 021=034 008-047 011-010 015-006 015-009
%TOHDX	  SUPDUP 021=024
%TOIML	  SUPDUP 021=035
%TOLID	  SUPDUP 021=036 008-051
%TOLWR	  SUPDUP 021=033 008-042 031-034
%TOMOR	  SUPDUP 021=030 009-035 031-034
%TOMVB	  SUPDUP 021=025 008-019 008-031 008-037 031-034
%TOMVU	  SUPDUP 021=029 008-039 012-026
%TOOVR	  SUPDUP 021=028 008-017 008-025 008-037 031-034
%TORAW	  SUPDUP 021=032 031-034
%TOROL	  SUPDUP 021=031 009-041
%TOSA1	  SUPDUP 021=027 009-029 010-018
%TOSAI	  SUPDUP 021=026 008-022 010-018 012-012 015-006 015-007
%TP11T	  SUPDUP 021=043
%TPCBS	  SUPDUP 021=042 009-005
%TPIBC	  SUPDUP 021=045
%TPIBM	  SUPDUP 021=046
%TPORS	  SUPDUP 021=044 009-009
%TPPCR	  SUPDUP 021=039
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page II

%TPPLF	  SUPDUP 021=038
%TPPTB	  SUPDUP 021=040
%TPTEL	  SUPDUP 021=041
%TXASC	  SUPDUP 021=065 011-026 011-031
%TXCTL	  SUPDUP 021=066 011-024 011-030 041-016 042-019 042-020 042-024 042-026 042-030 043-041 043-042 059-003 059-004
	 059-006 059-009
%TXMTA	  SUPDUP 021=067 011-022 041-016 042-023 042-029 043-017 043-039 043-040
%TXSFL	  SUPDUP 021=069 011-018 043-017
%TXSFT	  SUPDUP 021=068 011-020 043-017
%TXTOP	  SUPDUP 021=070 011-016 011-030 011-030 015-017 043-016 043-017 043-029 043-030 057-010 059-011 059-015 059-019
	 059-031 059-034 059-037 059-040
%ZEROS	  MACROS 003=010  SUPDUP 030-033 030-036 034-055 035-017 038-060 039-008 039-009 039-025 048-008 048-016 048-041
	 048-042 049-049 050-036 054-008 054-017 054-018 055-014 055-030 055-049 056-014 056-025 056-031 056-038 056-058
	 058-004 058-050  MACROS 008-022 010-017 010-030
...LIT	  SUPDUP 065:043 065-044
.DECDF	  SAIDFS 001+024  SUPDUP 023-007
ACDEF.	  MACROS 004+035  SUPDUP 003-010 003-017
ADDX	  MACROS 009+011  SUPDUP 044-051 047-008 048-015 049-021 051-024 051-045 051-050 054-010 054-033 054-046 055-006
	 055-022 056-056 056-070 059-007 059-011 059-015 059-019 059-031 059-034 059-037 059-040 063-040
ALLACT	  SUPDUP 023=014 031-044 062-049
ALLIMP	  SUPDUP 046:030 044-020 046-014
ALLOMP	  SUPDUP 043:058 041-008
ANDX	  MACROS 010+059  SUPDUP 034-031 046-039 054-053 063-035 064-008
ARE	  SUPDUP 019:039 004-031 004-040 005-009 005-012 005-013 005-025 005-035 005-036 005-038 005-039 005-041 006-009
	 006-011 006-011 006-012 006-019 006-041 006-053 006-054 007-011 008-003 008-009 008-026 009-017 009-018 009-018
	 009-019 010-004 010-009 010-013 010-017 010-022 010-023 010-024 010-027 010-028 010-028 010-035 010-045 011-006
	 011-007 012-003 012-004 012-006 012-007 012-007 012-022 013-021 013-045 013-052 014-010 014-016 015-008 015-009
	 015-016 016-007 017-013 017-023 018-021 018-036 018-037 019-007 019-012 019-012 019-019 019-035 019-038 020-003
	 020-004 020-031 020-058 061-018
AS	  SUPDUP 017:013 004-017 004-019 004-030 004-045 004-045 004-048 005-003 005-007 005-008 005-011 005-016 005-021
	 005-044 006-006 006-018 006-041 007-011 007-012 008-035 008-048 010-015 010-035 010-041 010-043 011-007 011-009
	 011-028 011-032 012-006 012-041 012-047 013-016 013-017 016-035 018-014 018-039 018-041 018-048 019-038 019-051
	 019-051 019-052 020-052 020-065 020-068
BADHST	  SUPDUP 033:030 032-025 033-048
BARF	  SUPDUP 028=019 028-029 029-004 029-018 030-025 034-011 034-018 037-027 062-004 062-033 064-045
BEEP	  SAIDFS 001=286  SUPDUP 050-006 060-021
BIT	  MACROS 004=050  SUPDUP 005-010 006-004 006-006 006-006 006-007 006-012 006-025 008-004 008-007 009-003 009-007
	 009-011 009-022 010-010 010-020 010-020 010-021 010-022 010-025 010-027 010-027 010-034 010-034 010-035 010-036
	 010-038 010-038 010-039 010-041 010-041 010-045 010-045 010-046 010-048 011-012 011-031 013-021 015-015 015-017
	 016-040 018-020 018-021 018-034 021-015 021-016  MACROS 004-047 004-048 004-049
BITS	  SUPDUP 011"029 016"033 006-007 006-009 006-009 008-001 008-003 009-001 009-017 009-018 010-023 011-004 011-011
	 011-029 011-030 011-030 015-007 016-031 016-033 019-038
BOTLIN	  SUPDUP 026=065 049-054 049-054
BREDLE	  SUPDUP 050:005 047-050
BSACT	  SUPDUP 023=015 031-044 062-049
BURP	  SUPDUP 028=018 028-019 028-028 037-033 038-004 038-010 038-018 038-024 038-036 038-043 045-016 045-020 045-024
	 045-028 046-048 047-011 047-032 047-034 047-038 047-040 047-042 047-045 047-051 047-057 047-059 060-018 065-005
CALL	  MACROS 003=058  SUPDUP 003-049 003-051 003-053 009-020 016-020 019-012 019-012 019-043 020-036 020-038 020-040
	 020-042 020-059 028-023 028-038 028-041 028-058 036-018 036-020 036-024 037-006 037-008 038-003 038-009 038-017
	 038-023 038-029 038-035 038-041 038-042 038-048 038-049 038-053 038-054 038-061 038-062 039-019 039-021 039-022
	 039-033 039-037 040-005 040-010 041-008 041-024 041-028 043-009 043-020 043-044 043-046 044-012 044-019 044-020
	 044-049 044-053 045-034 045-035 046-009 047-029 047-030 047-031 047-036 047-044 047-047 047-049 047-050 048-043
	 048-045 048-051 048-053 050-012 050-014 050-016 050-018 050-035 054-020 054-031 054-035 054-039 054-042 054-060
	 054-068 056-006 056-022 056-024 056-034 057-015 057-017 057-018 058-044 058-049 060-010 060-025 060-026 061-015
	 065-017  MACROS 007-009
CBKTL	  SUPDUP 064:044 064-038
CCS	  SUPDUP 023=063 063-026
CCTROV	  SUPDUP 064:016 064-010
CDISP	  SUPDUP 027:034 054-043 054-061
CEOF	  SUPDUP 064:037 064-031
CHARAC	  SUPDUP 005"036 002-023 004-030 005-008 005-010 005-012 005-019 005-021 005-024 005-025 005-036 005-038 005-038
	 005-039 005-040 006-008 006-013 006-033 006-037 006-054 007-010 007-010 008-009 008-016 008-023 008-026 008-032
	 008-048 008-056 009-029 009-031 009-032 010-007 010-009 010-010 010-010 010-013 010-013 010-015 010-017 010-018
	 010-020 010-021 010-021 010-022 010-023 010-024 010-025 010-026 010-032 010-036 010-042 010-045 010-046 010-048
	 010-050 010-050 011-006 011-008 011-009 011-010 011-011 011-016 011-022 011-024 011-026 011-032 011-032 012-004
	 012-005 012-010 012-012 012-054 013-005 013-020 013-024 014-005 014-007 014-008 014-012 014-014 014-015 014-018
	 015-001 015-003 015-004 015-006 015-008 015-008 015-009 015-010 015-013 015-015 015-017 015-020 015-054 015-056
	 016-001 016-004 016-006 016-007 016-008 016-011 016-023 016-033 016-034 016-035 016-039 018-012 018-013 018-016
	 018-017 018-021 018-023 018-027 018-031 018-037 018-039 018-040 018-040 018-049 019-006 019-015 019-025 019-034
	 020-003 020-052 020-056 020-067 058-020 060-018 061-027
CHFHNM	  SUPDUP 032:006
CLEOF1	  SUPDUP 050:035 050-039
CLEOL1	  SUPDUP 049:021 049-025
CLKINT	  SAIDFS 001=087  SUPDUP 036-010
CLOSE	  SAIDFS 001=065  SUPDUP 019-026 062-039
CLOSED	  SUPDUP 063:010 063-010 064-007
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page III

CLR1CH	  SUPDUP 049:029 047-031
CLRBFI	  SAIDFS 001=108  SUPDUP 033-032 034-003 058-029
CLREOF	  SUPDUP 050:033 047-029
CLREOL	  SUPDUP 049:005 047-030 049-059 050-035
CLRSCN	  SUPDUP 048:041 047-049
CLSCOD	  SUPDUP 025:021 035-008 035-009
CLSEDP	  SUPDUP 024:028 029-035 064-006
CLSR	  SUPDUP 023=049 029-034 034-050 035-045 035-062
CLSS	  SUPDUP 023=048 029-034 034-050 035-045 035-062
CLSSKT	  SUPDUP 025:023 034-038
CLSSTA	  SUPDUP 025:022
CLSWAT	  SUPDUP 025:024
CMDCMD	  SUPDUP 057:003 040-012
CNEMAX	  SUPDUP 063=031 063-036
CNEMES	  SUPDUP 063+020 063-025 063-026 063-027 063-028 063-029 063-030
CNETAB	  SUPDUP 063:025 063-021 063-031 063-045
CNSBLK	  SUPDUP 024:009 024-015 031-005 036-015
CNSBLL	  SUPDUP 024=015 031-005 036-016
CODE	  MACROS 009+004 009+028  SUPDUP 006-053 012-008 012-017 012-038 013-003 013-016 014-003 015-016 019-005 020-033
	 020-055 047-004 047-023 047-023 063-021 063-021 063-037  MACROS 008-063 008-066 008-067 009-003 009-006 009-007
	 009-027 009-030 009-031 010-005 010-008 010-009 010-010
CODES	  SUPDUP 012"006 005-010 005-032 006-044 006-053 007-004 012-001 012-003 012-005 012-006 012-007 013-001 013-021
	 013-022 014-001 015-016 018-010
COMMAN	  SUPDUP 019:017 061:003 061:022 007-005 011-009 016-022 016-025 018-028 019-019 019-019 019-034 019-049 060-018
	 061-018 061-027
CONERR	  SUPDUP 063:035 034-044 035-022 035-031 035-039 035-056
CORBEG	  SUPDUP 024=007 002-015 030-036
CORE	  SAIDFS 001=192  SUPDUP 030-024 030-025
COREND	  SUPDUP 026=036 030-036
COUNT	  SUPDUP 006"046 006-015 006-018 006-018 006-046 011-040 011-042 011-043 011-050 013-041
CPOPJ1	  SUPDUP 065:030 056-013
CRSET	  SUPDUP 064:023 064-017
CRUPDP	  SUPDUP 026:034 044-039 044-043 049-058 050-028 054-072
CSRAOS	  SUPDUP 050:024 047-047
CSRUPD	  SUPDUP 054:027 039-037 054-021 054-070 054-074
CTLFYP	  SUPDUP 024:037 041-018
CTMO	  SUPDUP 064:030 064-024
CTROV	  SUPDUP 023=056 034-046 035-041 035-058 064-008 064-016
CURSOR	  SAIDFS 001=310  SUPDUP 004-026 005-009 005-013 005-026 006-043 008-020 008-040 009-036 011-045 011-046 011-052
	 012-014 012-019 012-024 012-038 012-051 012-051 012-054 012-056 013-005 013-006 013-008 013-009 013-011 013-027
	 013-031 013-035 013-042 013-043 013-048 013-049 014-007 014-013 014-015 056-057
DBUGP	  SUPDUP 002=042 026-040 028-037 030-010 030-011
DDCMD	  SUPDUP 003+038 026-053 026-059 026-060 027-005 027-006 027-008 027-014 027-015
DDDLIN	  SUPDUP 023=023 031-028 031-030
DDP	  SUPDUP 024:020 028-060 031-029 037-016 039-029 054-037 058-043
DDTCAL	  SUPDUP 028:048 028-038 028-041 060-010
DDTP	  SUPDUP 002=043 026-040 028-035 028-039 030-009 030-011 030-018 030-027 060-007
DDUPG	  SAIDFS 001=336  SUPDUP 028-061 039-030 054-043 054-061 058-045
DEBREA	  SAIDFS 001=246  SUPDUP 029-030
DEBUGP	  SUPDUP 026:040 028-040 030-009 030-019 030-028
DEFINE	  SUPDUP 019:020
DELCH0	  SUPDUP 053:009 053-040
DELCH1	  SUPDUP 053:034 053-026
DELCH2	  SUPDUP 053:030 053-035
DELCHR	  SUPDUP 053:003 045-010
DELLIN	  SUPDUP 051:033 045-006
DELLN0	  SUPDUP 051:039 051-053
DELLN1	  SUPDUP 051:048 051-043
DEVNUM	  SAIDFS 001=281  SUPDUP 037-040
DISLIN	  SUPDUP 023=021 031-024 031-030
DISMIS	  SAIDFS 001=237  SUPDUP 029-020
DMBUFL	  SUPDUP 002=047 002-017 027-058 039-004 039-013 055-049 055-050 056-014 056-015 056-058 056-059
DMCHAR	  SUPDUP 056:005 003-051 003-053 039-019 039-021 044-049 044-053 048-036 048-051 048-053 054-031 054-035 056-022
	 056-024 056-034
DMCMD	  SUPDUP 003+046 039-016 039-017 044-046 048-048 048-049 049-006 049-030 049-031 049-047 050-025 051-006 051-007
	 051-008 051-034 051-035 051-036 052-004 052-005 052-006 053-004 053-005 053-006 054-028 056-019 056-020 056-040
DMCNT	  SUPDUP 027:060 003-047 039-004 039-013 044-018 055-050 056-005 056-015 056-059
DMDISP	  SUPDUP 027:055 056-052 056-053
DMDRW1	  SUPDUP 056:028 056-041
DMDRW2	  SUPDUP 056:032 056-033 056-037
DMLIN	  SUPDUP 023=022 031-026 031-030
DMOUT	  SUPDUP 056:048 003-049 039-022 048-054 054-020 054-036 056-006
DMP	  SUPDUP 024:019 031-027 037-010 037-020 039-012 039-035 044-044 048-035 048-046 049-005 049-029 049-046 050-024
	 051-005 051-033 052-003 053-003 054-019 054-027 055-031 056-012 058-022 065-012
DMPGM	  SUPDUP 027:058 027-055 039-005 039-014 055-046 055-049 055-049 055-051 056-014 056-014 056-016 056-048 056-051
	 056-058 056-058 056-060
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page IV

DMPNT	  SUPDUP 027:061 039-006 039-015 044-021 055-052 056-007 056-017 056-050 056-061 056-063 056-065 056-068 056-072
DMREDW	  SUPDUP 056:012 058-044
DOCUME	  SUPDUP 005:035 004-016 017-004 017-010
DONE	  SUPDUP 020:031 005-027 007-009
DPYCTB	  SUPDUP 047:027 047-014 047-023 047-061
DPYSER	  SUPDUP 047:003 045-012
DPYSVR	  SUPDUP 047+022 047-027 047-028 047-029 047-030 047-031 047-032 047-034 047-036 047-037 047-038 047-040 047-042
	 047-044 047-045 047-047 047-048 047-049 047-050 047-051 047-053 047-054 047-055 047-056 047-057 047-059
DSIBF	  SUPDUP 024:043 037-026 065-023 065-027
DSOBF	  SUPDUP 024:044 062-003 062-030 062-035
ECHARR	  SUPDUP 023=024 055-044
END	  MACROS 004+015  SUPDUP 006-035 012-043 012-049 012-053 013-029 014-010 014-016 064-040 065-050  MACROS 004-013
ENTER	  SAIDFS 001=072  SUPDUP 018-022 018-028 019-019 020-064 020-067
ESCPIP	  SUPDUP 024:035 029-014 040-011
EXIT	  SAIDFS 001=193  SUPDUP 031-019 057-025 063-006 063-011 063-044 063-046 064-013 064-020 064-027 064-034 064-041
	 064-054  SAIDFS 001-194
FEATUR	  SUPDUP 019:001 004-032 004-042 005-030
FILINP	  SUPDUP 024:025 033-011 033-014 033-022 033-043 033-052
FLSSPC	  SUPDUP 038:049 038-052
FNDROM	  SUPDUP 038:035 038-028 038-040
FOLLOW	  SUPDUP 005:007 010:035 005-035 005-045 006-009 006-010 006-051 007-006 007-010 007-011 008-003 009-017 009-032
	 011-051 012-019 013-020 013-024 013-031 016-006 016-033 019-019 020-003 020-031
FORM	  SUPDUP 011:012 006-005 010-025 016-018 020-058
GETCH	  SUPDUP 065:023 038-003 038-009 038-017 038-023 038-029 038-035 038-042 038-049 038-054 065-028
GETCSY	  SUPDUP 055:005 054-042 054-060
GETHST	  SUPDUP 033:003 032-007 032-009 033-033
GETLIN	  SAIDFS 001=105  SUPDUP 031-017 055-042 062-016 062-043
GETSTS	  SAIDFS 001=059  SUPDUP 034-045 035-040 035-057 063-015 064-005
GLNINI	  SUPDUP 048:018 054-039
GOHPOS	  SUPDUP 026:018 044-031 044-033
GOICP	  SUPDUP 034:003 033-020 033-028 033-046
GOVPOS	  SUPDUP 026:017 044-030 047-027
GRTDUN	  SUPDUP 036:032 036-026
GRTMSG	  SUPDUP 036:024 036-028
GTDCH	  SUPDUP 026:027 045-009 047-056
GTDLN	  SUPDUP 026:025 045-005 047-054
GTHPOS	  SUPDUP 026:020 044-037 044-041
GTICH	  SUPDUP 026:026 045-007 047-055
GTILN	  SUPDUP 026:024 045-003 047-053
GTVPOS	  SUPDUP 026:019 044-034 044-036 047-028 047-048
HDEAD	  SUPDUP 023=055 034-046 035-041 035-058 064-008 064-009
HLPTX1	  SUPDUP 061:021 060-004
HLPTXT	  SUPDUP 061:003 058-014
HPOS	  SUPDUP 026:012 039-008 044-042 044-047 048-027 048-029 048-034 048-042 049-008 049-015 049-038 049-049 050-017
	 050-027 050-033 050-036 050-041 052-013 053-013 054-029 054-044 056-018 056-031 056-035 056-038 056-042 056-054
	 056-066
ICPSKT	  SUPDUP 002=045 002-018 034-040
IDD	  SUPDUP 023=067 063-030
IIIHDR	  SUPDUP 026:046 039-026
IIIP	  SUPDUP 024:021 031-025 037-018 039-024 054-012 065-008
IIOERR	  SUPDUP 064:008 034-047 034-053 035-042 035-048 035-059 035-065 063-016
ILB	  SUPDUP 023=066 063-029
IMGCHP	  SUPDUP 024:036 042-009 060-024
IMGSND	  SUPDUP 060:024 057-011 059-005 059-008 059-012 059-016 059-020 059-023 059-026 059-029 059-032 059-035 059-038
	 059-041
IMPBIT	  SUPDUP 023=026 031-022
IMPBYT	  SUPDUP 025:009 034-035 035-018
IMPCOD	  SUPDUP 025:005 034-035 034-041 035-019 035-028
IMPFSK	  SUPDUP 025:010 034-040 034-054 035-006 035-007 035-027
IMPHST	  SUPDUP 025:011 034-039
IMPLSK	  SUPDUP 025:007 034-037 035-015 035-026
IMPSTA	  SUPDUP 025:006 034-035 034-042 035-020 035-029
IMPWAT	  SUPDUP 025:008 034-036 035-017
IMSKCL	  SAIDFS 001=090  SUPDUP 029-028
IN	  SAIDFS 001=055  SUPDUP 002-022 002-023 004-029 004-031 004-039 004-043 004-045 004-046 004-047 005-007 005-016
	 005-017 005-019 005-020 005-026 005-030 005-035 005-037 005-037 005-039 005-039 005-045 006-003 006-005 006-007
	 006-009 006-016 006-028 006-031 006-033 006-037 006-042 006-042 006-043 007-005 007-013 008-003 008-004 008-026
	 009-038 010-021 010-022 010-026 010-028 010-034 010-040 010-042 011-011 011-012 011-041 011-047 011-051 012-012
	 012-012 012-029 013-018 015-007 016-006 016-035 016-040 017-006 017-009 017-023 018-011 018-036 018-049 019-005
	 019-007 019-036 019-054 020-003 020-004 020-005 020-031 020-055 020-067 028-056 035-003 038-004 038-010 038-018
	 038-024 038-036 038-043 044-009 046-006 046-048 061-018 063-025 065-024
INCHRS	  SAIDFS 001=101  SUPDUP 032-008 032-024
INCHRW	  SAIDFS 001=099  SUPDUP 033-004 041-005 041-023 057-003 058-026
INIT	  SAIDFS 001=049  SUPDUP 034-008 034-015
INPMAP	  SUPDUP 046:020 045-034
INPUT	  SAIDFS 001=063  SUPDUP 009-024 010-001 010-011 010-020 010-021 010-029 010-035 010-045 011-001 011-006 015-010
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page V

	 015-016 016-006 016-033 018-013 018-036 019-010 019-050 020-004 020-066 047-004 047-032 047-034 047-038 047-040
	 047-042 047-045 047-051 047-057 047-059
INSCH0	  SUPDUP 052:009 052-048
INSCH1	  SUPDUP 052:044 052-033
INSCH2	  SUPDUP 052:037 052-045
INSCHR	  SUPDUP 052:003 045-008
INSIRP	  MACROS 008+004  SUPDUP 034-035
INSKIP	  SAIDFS 001=110  SUPDUP 040-021 041-003 041-025
INSLIN	  SUPDUP 051:005 045-004
INSLN0	  SUPDUP 051:011 051-027
INSLN1	  SUPDUP 051:017 051-021
INSLN2	  SUPDUP 051:022 051-015
INTCLK	  SUPDUP 023=032 029-008 036-008
INTDEJ	  SAIDFS 001=338  SUPDUP 029-036
INTENB	  SAIDFS 001=238  SUPDUP 036-009
INTERR	  SUPDUP 011"050 002-026 005-011 005-016 005-020 011-039 011-040 011-050 029-004 029-018
INTIMS	  SUPDUP 023=034 029-015 036-008
INTINP	  SUPDUP 023=035 029-011 036-008
INTINR	  SUPDUP 023=050
INTINS	  SUPDUP 023=033 023=051 029-009 036-008
INTROD	  SUPDUP 018:006 004-014
INTSER	  SUPDUP 029:003 030-015
INTTTI	  SUPDUP 023=036 029-013 036-008
INTTTY	  SUPDUP 023=031 029-006 036-008
IOBKTL	  SUPDUP 023=074 034-046 035-041 035-058 064-008 064-044 064-045
IODEND	  SUPDUP 023=075 034-046 035-041 035-058 064-008 064-037
IODERR	  SUPDUP 023=072 034-046 035-041 035-058 064-008 064-011 064-018 064-025 064-032 064-039 064-051 064-052
IODTER	  SUPDUP 023=073 034-046 035-041 035-058 064-008 064-011 064-018 064-025 064-032 064-039 064-050
IOIMPM	  SUPDUP 023=071 034-046 035-041 035-058 064-008 064-044 064-045
IORX	  MACROS 010=057  SUPDUP 042-024 042-030 043-016 052-042 054-054 054-055  MACROS 010-057
IS	  SUPDUP 017:019 002-018 004-021 004-025 004-026 004-031 004-034 004-038 004-041 004-044 004-047 004-053 005-007
	 005-018 005-026 005-029 005-030 005-031 005-041 005-044 005-045 006-004 006-006 006-007 006-008 006-015 006-022
	 006-034 006-037 006-037 006-046 006-047 006-048 006-048 007-006 007-007 007-010 007-013 007-015 008-012 008-013
	 008-019 008-025 008-039 008-042 008-044 008-047 008-051 008-055 009-005 009-011 009-019 009-038 010-021 010-025
	 010-029 010-035 010-036 010-037 010-038 010-038 010-039 010-039 010-040 010-041 010-041 010-042 010-047 011-008
	 011-009 011-010 011-011 011-011 011-028 011-028 011-028 011-032 011-038 011-039 011-042 011-045 011-053 012-003
	 012-012 012-012 012-014 012-034 012-043 012-054 013-005 013-008 013-011 013-020 013-042 013-043 013-048 013-049
	 013-049 014-007 014-007 014-013 014-014 014-015 015-016 015-018 016-034 016-038 016-040 017-006 018-008 018-008
	 018-016 018-018 018-024 018-026 018-030 018-047 018-048 019-005 019-005 019-006 019-013 019-019 019-027 019-049
	 019-049 019-053 020-005 020-005 020-006 020-052 020-052 020-055 020-055 020-058 020-061 020-061 020-064 020-064
	 020-065 037-033 047-023 047-061 063-021
ITS	  SUPDUP 058:020 004-018 004-022 004-050 005-004 005-004 005-007 005-025 005-029 006-012 006-034 006-043 008-013
	 008-022 009-030 009-038 010-004 010-012 010-048 012-005 012-011 012-030 015-001 015-007 016-001 017-005 018-003
	 018-008 018-009 018-009 018-010 018-012 018-018 018-022 018-023 018-031 018-033 018-034 018-037 018-039 018-040
	 018-045 019-023 019-027 019-034 019-038 020-005 020-006 020-009 020-033 020-065
IWAIT	  SAIDFS 001=249  SUPDUP 040-006
JOB41	  SAIDFS 001=135  SUPDUP 028-023
JOBAPR	  SAIDFS 001=148  SUPDUP 030-016
JOBCNI	  SAIDFS 001=149  SUPDUP 029-003
JOBDDT	  SAIDFS 001=139  SUPDUP 028-048 030-030
JOBFF	  SAIDFS 001=146  SUPDUP 030-023 030-037 030-038
JOBOPC	  SAIDFS 001=151  SUPDUP 065-037 065-038
JOBREL	  SAIDFS 001=137  SUPDUP 030-040
JOBREN	  SAIDFS 001=147  SUPDUP 065-035
JOBSA	  SAIDFS 001=145  SUPDUP 030-017 030-021
JOBTPC	  SAIDFS 001=150  SUPDUP 029-025
JOBUUO	  SAIDFS 001=134  SUPDUP 028-026 028-027 028-031
LDISP	  SUPDUP 027:041 055-018 055-019 055-032
LEYPOS	  SAIDFS 001=308  SUPDUP 028-066 039-011 058-041
LGRSKT	  SUPDUP 024:048
LINEL	  SUPDUP 002=049 002-023 002-055 049-009 049-022
LINPR1	  SUPDUP 027:015 055-028
LINPRG	  SUPDUP 027:014 055-023
LOCATI	  SUPDUP 007"011 007-011 007-013 065-005
LOCK	  SAIDFS 001=275  SUPDUP 009"025 009-025 039-038
LOGOUT	  SAIDFS 001=199  SUPDUP 007-008
LOOKUP	  SAIDFS 001=071  SUPDUP 037-032
LOSER	  SUPDUP 039:038 039-007
LUZINT	  SUPDUP 029:018 029-024
MAIL	  SAIDFS 001=080  SUPDUP 004-053  SAIDFS 001-032
MAINLP	  SUPDUP 040:010 039-039 041-004 044-008
MAP	  MACROS 003=033  SUPDUP 016-039
MAPIT	  SUPDUP 003+030 043-052 043-053 043-054 043-058 043-059 043-060 046-020 046-021 046-022 046-023 046-024 046-025
	 046-026 046-030 046-031
MAPPIN	  SUPDUP 019:003 019:010 061:011 010-032 018-036 018-037 018-038 019-036 020-001 020-003 020-003 020-031 020-058
	 020-061 020-064 020-071
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page VI

MENTIO	  SUPDUP 018:045
MODES	  SUPDUP 019:046
MONCOM	  SUPDUP 032:008 032-023
MOVX	  MACROS 008+050  SUPDUP 003-032 003-050 003-052 029-031 030-033 031-016 033-017 033-019 033-025 033-027 033-040
	 033-042 033-049 033-051 034-052 034-055 035-014 035-047 035-064 036-005 036-008 036-016 037-005 037-007 037-029
	 037-031 037-039 038-060 039-018 039-020 041-017 041-034 042-021 042-027 043-026 043-028 048-006 048-008 048-009
	 048-010 048-050 048-052 049-019 049-033 050-005 050-011 050-013 052-027 053-036 054-007 054-008 054-049 054-066
	 055-033 055-041 056-021 056-023 056-028 056-062 056-064 057-014 057-016 058-021 060-020 062-010 062-015 062-024
	 062-025 062-042  MACROS 007-066 008-020 008-022 008-043 010-030 010-039
MSKBTS	  SUPDUP 024:053 029-027 029-028 029-036
MSTIME	  SAIDFS 001=203  SUPDUP 034-028  MACROS 002-044
MTAPE	  SAIDFS 001=067  SUPDUP 029-032 034-013 034-020 034-041 035-009 035-019 035-028 035-036 035-053 036-011 040-024
	 044-007
NCHARS	  SUPDUP 002=055 026-005 026-007 049-054
ND.	  MACROS 004+023  SUPDUP 002-045 002-046 002-047 002-048 002-049 002-050 002-051 002-052  MACROS 004-037
NETICH	  SUPDUP 046:005 036-024 046-012
NETOC1	  SUPDUP 041:044 036-018 037-006 037-008 038-041 038-048 038-053 038-061 042-004 043-020 043-044 043-046 050-012
	 050-014 050-016 050-018 057-015 057-017 065-017
NETOC2	  SUPDUP 043:008
NETOC3	  SUPDUP 043:026 042-025 042-031
NETOCH	  SUPDUP 042:003 041-024 060-025
NETP	  SUPDUP 024:023 031-023 037-009
NETSER	  SUPDUP 029:024 029-016
NETSND	  SUPDUP 041:033 036-020 038-062 041-028 050-020 057-018 060-026
NGW	  SUPDUP 026=007 027-007 048-018
NIOERR	  SUPDUP 064:005 041-040 041-047 042-008 044-011 046-008
NLA	  SUPDUP 023=065 063-028
NLINES	  SUPDUP 002=048 002-022 026-006 026-031 048-010 050-038 051-014 051-016 051-016 051-042 051-047 054-007 054-018
	 054-066 062-024
NLNGLT	  SUPDUP 002=050 002-024 031-008
NLNUPD	  SUPDUP 002=052 002-025 054-013
NOEEOB	  SUPDUP 023=042 027-055
NOEEOL	  SUPDUP 023=041 027-055
NOSOCK	  SUPDUP 063:015 035-005
NOTE	  SUPDUP 006:036 006:040 010:003 011:042 012-009 018-043
NOTES	  SUPDUP 020:050 020-007
NSCLIN	  SUPDUP 002=051 002-026 036-010
NTIBF	  SUPDUP 024:041 034-017 036-006 044-006 044-013 046-005 046-010 046-037 046-038 046-042 046-047 046-050
NTIINP	  SUPDUP 024:034 029-012 036-032 040-015 040-026 058-050
NTISER	  SUPDUP 044:006 040-016 040-027 044-015 044-017 044-022 044-026 044-032 044-035 044-040 044-045 044-054 045-018
	 045-022 045-026 045-030 045-036 047-013 047-015 051-029 051-055 052-050 053-042
NTOBF	  SUPDUP 024:042 034-017 036-007 041-033 041-037 041-044 041-048 042-005 043-018 043-027
NTOC2A	  SUPDUP 043:017 042-010 043-014
NTOINP	  SUPDUP 024:033 029-010 044-023 050-019
NULFLS	  SUPDUP 046:037 044-012 046-009
NWRDLN	  SUPDUP 026=005 026-006 026-065 027-042 048-013 048-014 048-015 048-026 049-014 049-037 049-052 049-053 051-012
	 051-014 051-016 051-016 051-018 051-019 051-023 051-040 051-042 051-045 051-047 051-049 052-010 052-012 053-010
	 053-012 055-016 055-030 055-036 056-028 062-025
NXTTTY	  SUPDUP 038:029 038-016 038-022 038-031
ON	  SUPDUP 009"018 004-027 004-027 004-041 005-016 005-021 006-003 008-010 009-018 009-019 009-020 010-011 010-013
	 010-029 010-036 010-048 011-053 012-004 012-026 012-050 012-055 013-008 013-043 014-008 014-008 014-018 015-017
	 018-016 018-017 018-019 018-021 018-022 018-026 018-034 018-039 018-040 018-045 018-051 019-023 019-027 019-037
	 019-038 019-049 019-050 019-050 020-004 020-005 020-006 020-006 020-052 020-065
OPEN	  SAIDFS 001=052  SUPDUP 034-011 034-018 035-067 037-026 037-027 062-003 062-004
ORESET	  SUPDUP 050:011 047-044
OUT	  SAIDFS 001=056  SUPDUP 011-047 019-026 019-052 041-038 041-045 042-006 047-023 057-019 062-031 062-033 063-021
OUTCHR	  SAIDFS 001=100  SUPDUP 033-009 036-027 047-009 060-016 060-017 063-041 063-043
OUTMAP	  SUPDUP 043:052 043-009
OUTPUT	  SAIDFS 001=064  SUPDUP 005-007 005-011 006-035 006-043 009-009 009-013 009-042 010-014 010-017 011-036 011-041
	 011-041 011-046 011-048 012-001 012-003 013-001 013-016 013-017 014-001 015-008 015-015 018-013 018-036 019-003
	 019-052 019-054 020-004 020-052 020-071
OUTSTR	  SAIDFS 001=102  SUPDUP 028-033 028-036 028-049 028-056 030-010 030-012 033-003 033-015 033-023 033-030 033-044
	 033-053 034-004 035-067 047-004 055-046 057-019 058-005 058-014 058-020 058-027 058-037 060-004 062-023 063-005
	 063-010 063-037 063-045 064-012 064-014 064-019 064-021 064-026 064-028 064-033 064-035 064-040 064-042 064-053
OVPOS	  SUPDUP 026:013 039-034 054-040 054-059
P	  MACROS 003=054  SUPDUP 019-024 028-036 028-043 030-041 037-033 038-004 038-010 038-018 038-024 038-036 038-043
	 056-043 061-006 065-005 065-030  MACROS 003-054 003-056 003-057 003-058 003-059
PDL	  SUPDUP 024:049 002-014 030-041
PDLLEN	  SUPDUP 002=046 002-014 024-049 030-041
PGMBEG	  SUPDUP 028=021 002-015 002-016
PJOB	  SAIDFS 001=206  SUPDUP 034-027
PPACT	  SAIDFS 001=303  SUPDUP 028-064 039-010 058-015 058-017 058-042 062-050
PPREL	  SAIDFS 001=306  SUPDUP 058-031
PPSEL	  SAIDFS 001=302  SUPDUP 058-013
PROCES	  SUPDUP 008"035 008-035 009-009 009-036 009-038 010-034  MACROS 008-016
PRTCMD	  SUPDUP 060:003 057-027
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page VII

PRTOUT	  SUPDUP 055:041 044-019 054-004
PRTP	  SUPDUP 024:024 028-054 028-062 031-032 039-003 041-006 042-003 044-014 046-013 054-003 057-023 057-026 065-010
PTJOBX	  SAIDFS 001=331  SUPDUP 028-052 028-059 031-045 062-014 062-041
PTYLIN	  SUPDUP 023=025 031-020
PTYP	  SUPDUP 024:022 031-021 037-014
QUIT	  SUPDUP 057:022 019-026 057-020 061-006 061-007 061-024 061-025
RECORD	  SUPDUP 062:003 019-028 058-034 061-007 062-023
RECRD1	  SUPDUP 062:025 062-038
RECRD2	  SUPDUP 062:028 062-029 062-037
REFUSE	  SUPDUP 063:005 034-051 035-046 035-063 063-005
RELEAS	  SAIDFS 001=066  SUPDUP 035-010 038-063 062-040
RENSVR	  SUPDUP 065:037 065-035
RESCAN	  SAIDFS 001=107  SUPDUP 032-006
RESET	  SAIDFS 001=183  SUPDUP 006-043 014-021 030-008
RETNPC	  SUPDUP 024:054 029-026
RETR	  MACROS 003=057  SUPDUP 050-040 050-041 055-047 056-042 056-042
RETURN	  MACROS 003=059  SUPDUP 003-033 007-012 016-019 019-025 028-044 028-051 028-067 041-039 041-049 043-021 043-047
	 043-061 046-032 046-041 046-051 048-019 048-030 048-037 048-047 049-010 049-023 049-042 050-007 050-029 050-042
	 054-038 054-062 054-073 055-010 055-037 055-053 056-008 056-049 056-073 058-020 065-031
REVIEW	  SUPDUP 058:041 058-032 062-051
RFCR	  SUPDUP 023=047 034-048 034-049 035-043 035-044 035-060 035-061
RFCS	  SUPDUP 023=046 034-048 034-049 035-043 035-044 035-060 035-061
RNDROM	  SUPDUP 065:015 038-050
RNDTID	  SUPDUP 065:005 037-035 037-041 038-006 038-012 038-020 038-026 038-038 038-045 065-026
RSET	  SUPDUP 023=057 034-046 035-041 035-058 064-008 064-023
RUN	  SAIDFS 001=211  SUPDUP 004-036 005-016 005-018 018-016 018-026 018-030
RUNCMP	  SUPDUP 024:026 032-014 032-016 032-017 032-019
SAUPDP	  SUPDUP 026:033 028-065 048-044 049-055 051-028 051-054 054-014 054-015 058-048
SAVE	  MACROS 003=056  SUPDUP 028-025 028-025 028-026 050-033 050-034 055-043 056-018 056-018
SCBYTP	  SUPDUP 027:047 048-033 049-018 049-041
SCC	  SUPDUP 027:005 027-010 027-034 027-037 048-018 048-018 054-056 054-057 055-007 055-009
SCCL	  SUPDUP 027=010 027-035
SCE	  SUPDUP 026:053 026-055 027-021
SCEL	  SUPDUP 026=055 027-022
SCLEAR	  SUPDUP 027:021 028-061 039-030 058-045
SCNHST	  SUPDUP 033:012 032-033
SCNUP1	  SUPDUP 054:015 054-006
SCNUPD	  SUPDUP 054:003 040-005 040-010 048-045 058-049
SCP	  SUPDUP 026:059 026-064 027-027 027-030 039-025 039-027
SCPL	  SUPDUP 026=064 027-028
SCREEN	  SUPDUP 026:061 002-022 002-023 002-025 005-009 006-031 006-034 008-013 009-037 009-042 011-053 012-043 012-050
	 013-009 013-035 013-036 013-045 013-051 014-018 018-051 019-025 019-028 019-031 019-051 019-055 020-006 026-065
	 048-005 048-011 048-012 048-013 048-014 048-032 049-017 049-040 049-052 049-052 049-053 051-013 051-014 051-016
	 051-016 051-041 051-042 051-047 052-012 052-015 053-012 053-015 055-017 056-030 061-007 061-008 062-023 062-027
SCREND	  SUPDUP 026=062
SCRIN1	  SUPDUP 048:011 048-017
SCRINI	  SUPDUP 048:005 039-033 048-043
SCRSIZ	  SUPDUP 026=006 026-061 026-065 049-053
SCSTOR	  SUPDUP 048:023 045-035
SCUP1A	  SUPDUP 054:067 054-069
SCUPD1	  SUPDUP 054:064 054-016
SCUPD2	  SUPDUP 054:072 054-065
SCUPDP	  SUPDUP 026:032 048-025 049-013 049-036 052-046 053-038 054-017 054-064
SDISP	  SUPDUP 027:027 039-036 054-022
SDPDPY	  SUPDUP 031:039 031-031
SDPFF	  SUPDUP 065=048 002-016 030-020 030-031
SDTTOP	  SUPDUP 021=009 021=016 021-016 031-007
SEARCH	  SUPDUP 038:003 038-008 038-030
SEND	  SAIDFS 001=311  SUPDUP 010-014 011-051 018-012 018-020 061-005 061-024
SERCH1	  SUPDUP 038:021 038-014
SERCH2	  SUPDUP 038:027 038-013
SET	  SUPDUP 010"013 012"005 002-042 002-043 004-027 004-032 009-017 009-017 009-019 009-031 010-010 010-010 010-013
	 010-021 010-023 010-026 010-046 010-046 010-048 011-010 012-005 012-012 012-012 012-030 015-001 015-004 015-006
	 015-007 016-001 018-012 018-016 018-017 018-023 018-046 018-047 018-048 018-049 019-006 020-003 020-056
SETACT	  SAIDFS 001=112  SUPDUP 031-041 062-019 062-046
SETDDT	  SAIDFS 001=185  SUPDUP 030-034
SETLIN	  SAIDFS 001=106  SUPDUP 031-040 055-045 055-048 062-018 062-045
SETNAM	  SAIDFS 001=216  SUPDUP 033-018 033-026 033-041 033-050
SIDE	  SUPDUP 005"017 005-016 005-017 005-020 006-005 006-005
SIU	  SUPDUP 023=062 063-025
SLEEP	  SAIDFS 001=207  SUPDUP 058-023 062-011
SLOWIP	  SUPDUP 024:027 054-005 058-004 058-036
SLUPDP	  SUPDUP 026:031 048-016 048-024 049-012 049-035 052-049 053-041 054-009 054-018 054-018 054-067 055-014
SNDID1	  SUPDUP 065:016 037-013 037-022 065-013 065-018
SNDROM	  SUPDUP 038:041 038-047
SNDTID	  SUPDUP 038:053 038-056
Cref of:    SUPDUP.MID[NET,MRC]      MACROS.MID[1,MRC]        SAIDFS.MID[CSP,SYS]             11/06/77  Page VIII

SNTROM	  SUPDUP 038:060
SPCBRK	  SUPDUP 023=027 031-039 062-017 062-044
STORE	  MACROS 008+037  SUPDUP 028-065 029-007 029-012 029-014 029-027 029-035 030-036 031-005 031-006 031-007 031-008
	 031-021 031-023 031-025 031-027 031-029 031-032 031-033 031-034 031-035 032-017 033-011 034-036 034-040 035-008
	 035-017 035-018 035-035 036-032 039-004 039-008 039-009 039-013 039-025 039-034 041-011 041-014 044-031 044-034
	 044-037 044-039 044-043 047-027 047-028 047-048 047-053 047-054 047-055 047-056 048-005 048-016 048-018 048-024
	 048-025 048-041 048-042 048-044 049-012 049-013 049-035 049-036 049-049 049-054 049-055 049-058 050-028 050-036
	 051-022 051-028 051-048 051-054 052-046 052-049 053-038 053-041 054-014 054-017 054-018 055-014 055-030 055-049
	 055-050 056-014 056-015 056-025 056-031 056-038 056-058 056-059 058-004 058-036 058-048 058-050 060-024
SUBX	  MACROS 009+019  SUPDUP 032-013 032-029 033-008 033-038 041-036 059-022 059-028
SUPCCR	  SUPDUP 023=017 031-044 062-049
SUPDP1	  SUPDUP 030:036 030-029 030-032
SUPDUP	  SUPDUP 030:007 002-003 004-006 004-012 004-016 004-019 004-021 004-024 004-025 004-034 004-038 004-047 004-050
	 004-053 004-053 004-054 005-003 005-017 005-018 005-018 005-024 006-003 006-038 006-042 008-003 010-004 012-007
	 012-011 017-012 017-016 017-019 018-001 018-008 018-008 018-011 018-016 018-019 018-022 018-026 018-030 018-032
	 018-046 018-050 019-001 019-019 019-048 019-053 020-001 065-039 065-050
SUPSCM	  SUPDUP 023=016 031-044 062-049
SWDEF.	  MACROS 004+063  SUPDUP 002-042 002-043
SWPRIN	  SUPDUP 003+023 002-014 002-015 002-016 002-017 002-018 002-022 002-023 002-024 002-025 002-026
SYS	  SUPDUP 023=064 023-006 063-027
TCMXH	  SUPDUP 024:013 006-010 006-033 006-040 031-009 031-012 031-012 048-028 056-036
TCMXV	  SUPDUP 024:012 006-010 006-031 006-040 031-009 031-011 031-011 031-035 049-051 049-056 056-026
TCTYP	  SUPDUP 024:010 006-010 006-021 018-019 018-045 018-048 018-050 031-006 031-033
TERPRI	  SUPDUP 049:046 047-036
TIDONE	  SUPDUP 038:062 065-019
TMO	  SUPDUP 023=058 034-046 034-052 035-041 035-047 035-058 035-064 064-008 064-030
TMPLOC	  MACROS 004+006  SUPDUP 028-023 065-035
TRUNCA	  SUPDUP 023=040 027-055
TTCHSN	  SUPDUP 036:017 036-019
TTIINP	  SUPDUP 024:032 029-007 040-013
TTISER	  SUPDUP 041:003 040-014 041-012 041-015 041-029 058-007 058-039 058-051 060-005 060-011 060-022 060-027
TTISR1	  SUPDUP 041:005 040-023 041-027
TTYOPT	  SUPDUP 024:011 006-010 006-024 006-029 008-001 008-003 009-001 012-012 015-007 031-007
TTYROL	  SUPDUP 024:014 006-010 006-046 031-008
TTYSET	  SAIDFS 001=294  SUPDUP 028-055 031-010 039-032 057-024 058-012 058-019 058-025 058-047 062-007 062-009 062-013
TXC	  MACROS 010+046  SUPDUP 034-048 035-043 035-060  MACROS 010-064
TXO	  MACROS 010+037  SUPDUP 031-039 043-030 043-040 043-042 057-010 062-044 064-051  MACROS 010-057
TXZ	  MACROS 010+028  SUPDUP 029-008 041-019 055-044 057-008 059-009 062-017 064-011 064-018 064-025 064-032 064-039
	  MACROS 010-061
UPDLIN	  SUPDUP 055:014 054-068
UPGIOT	  SAIDFS 001=075  SUPDUP 039-036 054-022 055-032 056-053
USE	  SUPDUP 021+013 004-018 004-054 004-054 010-009 010-028 010-045 010-048 012-012 018-010 018-022 019-022 019-030
	 020-067 021-023 021-025 021-026 021-027 021-029 021-030 021-033 021-034 021-036 021-037 021-042 021-044
UUOSER	  SUPDUP 028:025 028-023
UWAIT	  SAIDFS 001=245  SUPDUP 029-029
VPOS	  SUPDUP 026:011 012-032 012-033 039-009 044-038 044-050 048-023 048-041 049-011 049-034 049-050 050-015 050-034
	 050-037 050-040 051-011 051-039 052-009 052-047 053-009 053-039 054-032 054-058 056-018 056-025 056-039 056-042
	 056-055 056-069
WATCOD	  SUPDUP 025:015 035-035 035-036 035-053
WATSKT	  SUPDUP 025:017 035-016 035-052
WATSTA	  SUPDUP 025:016 035-037 035-054
XORX	  MACROS 010=064  SUPDUP 044-048 044-052 054-030 054-034 056-067 056-071  MACROS 010-064 010-068
ZZZZZZ	  SUPDUP 040:005 040-025